Compare commits

...

2 Commits
2 ... 1.1.1

Author SHA1 Message Date
Will Rossiter
03b47fb8eb
FIX Check if page exists 2020-04-14 09:16:23 +12:00
Robbie Averill
72d77a00c2 Update Travis builds to include PHP 7, update PHPUnit to 5.7 2019-07-24 12:35:21 +02:00
3 changed files with 25 additions and 22 deletions

View File

@ -1,26 +1,21 @@
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
sudo: false
dist: trusty
language: php
php:
- 5.4
- 5.5
env:
- DB=MYSQL CORE_RELEASE=3.5
matrix:
include:
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3.1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.2
- php: 7.1
- php: '5.6'
env: DB=MYSQL CORE_RELEASE=3.6
- php: '7.0'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.1'
env: DB=PGSQL CORE_RELEASE=3.7
- php: '7.2'
env: DB=MYSQL CORE_RELEASE=3.7
- php: '7.3'
env: DB=MYSQL CORE_RELEASE=3.7
before_script:
- composer self-update || true

View File

@ -35,11 +35,19 @@ class BrokenExternalLinksReport extends SS_Report {
"title" => 'Page link is on',
'formatting' => function($value, $item) {
$page = $item->Page();
return sprintf(
'<a href="%s">%s</a>',
Convert::raw2att($page->CMSEditLink()),
Convert::raw2xml($page->Title)
);
if ($page) {
return sprintf(
'<a href="%s">%s</a>',
Convert::raw2att($page->CMSEditLink()),
Convert::raw2xml($page->Title)
);
} else {
return sprintf(
'%s',
$item->Track()->PageID
);
}
}
)
);

View File

@ -21,10 +21,10 @@
},
"require-dev": {
"hafriedlander/silverstripe-phockito": "*",
"phpunit/PHPUnit": "~3.7@stable"
"phpunit/phpunit": "^5.7"
},
"suggest": {
"silverstripe/queuedjobs": "Speeds up running the job for Content Editors fropm the report"
},
"extra": []
}
}