diff --git a/core/Constants.php b/core/Constants.php index e0537eda543..48f10103b85 100644 --- a/core/Constants.php +++ b/core/Constants.php @@ -167,9 +167,10 @@ function stripslashes_recursively(&$array) { */ } else { /** - * Fix magic quotes setting + * Check if magic quotes are enabled (only relevant for php 5.3) + * get_magic_quotes_gpc() call is suppressed to avoid php7.4 deprecation notice */ - if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) { if($_REQUEST) stripslashes_recursively($_REQUEST); if($_GET) stripslashes_recursively($_GET); if($_POST) stripslashes_recursively($_POST); diff --git a/docs/en/00_Getting_Started/05_Coding_Conventions.md b/docs/en/00_Getting_Started/05_Coding_Conventions.md index f2559244b38..0ee36b4494d 100644 --- a/docs/en/00_Getting_Started/05_Coding_Conventions.md +++ b/docs/en/00_Getting_Started/05_Coding_Conventions.md @@ -48,7 +48,7 @@ Class and filenames are in `UpperCamelCase` format: class MyClass {} ``` -new word must be capitalized. Successive capitalized letters are used in +new words must be capitalized. Successive capitalized letters are used in acronyms, e.g. a class `XMLImporter` is used while `XmlImporter` is not. ### Methods diff --git a/i18n/i18n.php b/i18n/i18n.php index 909d3d1df0f..35c0c872307 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -2614,8 +2614,10 @@ public static function include_by_locale($locale, $clean = false) { $themesBase = Director::baseFolder() . '/themes'; if(is_dir($themesBase)) { foreach(scandir($themesBase) as $theme) { + $themename = (string)Config::inst()->get('SSViewer', 'theme'); if( - strpos($theme, (string)Config::inst()->get('SSViewer', 'theme')) === 0 + !empty($themename) + && strpos($theme, $themename) === 0 && file_exists("{$themesBase}/{$theme}/lang/") ) { $filename = $adapter->getFilenameForLocale($locale);