Skip to content

Commit

Permalink
Merge branch '3.7' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Aug 26, 2020
2 parents bc9e384 + c877954 commit 39c73e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions core/Constants.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/en/00_Getting_Started/05_Coding_Conventions.md
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion i18n/i18n.php
Expand Up @@ -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);
Expand Down

0 comments on commit 39c73e5

Please sign in to comment.