mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix deprecated php syntax
This commit is contained in:
parent
3f3f6854fe
commit
6c8dc0fd99
@ -31,8 +31,11 @@ matrix:
|
||||
- php: 7.3
|
||||
env: DB=SQLITE
|
||||
|
||||
- php: 7.4snapshot
|
||||
- php: 7.4
|
||||
env: DB=SQLITE INSTALL_PHPUNIT_FORK=1
|
||||
dist: xenial
|
||||
services:
|
||||
- mysql
|
||||
|
||||
# CMS test
|
||||
- php: 5.5
|
||||
|
@ -1993,7 +1993,7 @@ class LeftAndMain_TreeNode extends ViewableData {
|
||||
// Get additional filter classes
|
||||
if($this->filter && ($filterClasses = $this->filter->getPageClasses($this->obj))) {
|
||||
if(is_array($filterClasses)) {
|
||||
$filterClasses = implode(' ' . $filterClasses);
|
||||
$filterClasses = implode(' ', $filterClasses);
|
||||
}
|
||||
$classes .= ' ' . $filterClasses;
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ class Email extends ViewableData {
|
||||
return strtr($email, $obfuscated);
|
||||
case 'hex' :
|
||||
$encoded = '';
|
||||
for ($x=0; $x < strlen($email); $x++) $encoded .= '&#x' . bin2hex($email{$x}).';';
|
||||
for ($x=0; $x < strlen($email); $x++) $encoded .= '&#x' . bin2hex($email[$x]).';';
|
||||
return $encoded;
|
||||
default:
|
||||
user_error('Email::obfuscate(): Unknown obfuscation method', E_USER_NOTICE);
|
||||
|
@ -1810,7 +1810,7 @@ class Form extends RequestHandler {
|
||||
* @return string
|
||||
*/
|
||||
public function extraClass() {
|
||||
return implode(array_unique($this->extraClasses), ' ');
|
||||
return implode(' ', array_unique($this->extraClasses));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2615,7 +2615,7 @@ class i18n extends SS_Object implements TemplateGlobalProvider, Flushable {
|
||||
if(is_dir($themesBase)) {
|
||||
foreach(scandir($themesBase) as $theme) {
|
||||
if(
|
||||
strpos($theme, Config::inst()->get('SSViewer', 'theme')) === 0
|
||||
strpos($theme, (string)Config::inst()->get('SSViewer', 'theme')) === 0
|
||||
&& file_exists("{$themesBase}/{$theme}/lang/")
|
||||
) {
|
||||
$filename = $adapter->getFilenameForLocale($locale);
|
||||
|
@ -767,7 +767,7 @@ class Image extends File implements Flushable {
|
||||
foreach($matches as $formatdir) {
|
||||
$prepend[] = $formatdir[0];
|
||||
}
|
||||
$filename = implode($prepend) . $filename;
|
||||
$filename = implode('', $prepend) . $filename;
|
||||
|
||||
if (!preg_match($pattern['FullPattern'], $filename)) {
|
||||
throw new InvalidArgumentException('Filename ' . $filename
|
||||
|
@ -88,7 +88,7 @@ class Text extends StringField {
|
||||
}
|
||||
}
|
||||
|
||||
return count($output)==0 ? '' : implode($output, '. ') . '.';
|
||||
return count($output)==0 ? '' : implode('. ', $output) . '.';
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user