diff --git a/.travis.yml b/.travis.yml index f8e4e723e..c3e98dc44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index fc2e940cd..574c6b67e 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -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; } diff --git a/email/Email.php b/email/Email.php index 4e4585f83..4ce048d35 100644 --- a/email/Email.php +++ b/email/Email.php @@ -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); diff --git a/forms/Form.php b/forms/Form.php index d2f7c00e7..be066abed 100644 --- a/forms/Form.php +++ b/forms/Form.php @@ -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)); } /** diff --git a/i18n/i18n.php b/i18n/i18n.php index c1912fc19..909d3d1df 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -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); diff --git a/model/Image.php b/model/Image.php index abb5fe3d1..aafcd50fa 100644 --- a/model/Image.php +++ b/model/Image.php @@ -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 diff --git a/model/fieldtypes/Text.php b/model/fieldtypes/Text.php index c0313d7f7..558994d4e 100644 --- a/model/fieldtypes/Text.php +++ b/model/fieldtypes/Text.php @@ -88,7 +88,7 @@ class Text extends StringField { } } - return count($output)==0 ? '' : implode($output, '. ') . '.'; + return count($output)==0 ? '' : implode('. ', $output) . '.'; }