Skip to content

Commit

Permalink
Merge branch '3.4' into 4.1
Browse files Browse the repository at this point in the history
* 3.4:
  Fixed typo
  Fix ini_get() for boolean values
  SCA: fixed broken tests
  SCA: applied code style as per guidelines
  SCA: minor code tweaks
  • Loading branch information
nicolas-grekas committed Oct 31, 2018
2 parents 7b4b371 + 99b2fa8 commit 991fec8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ResourceCheckerConfigCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function write($content, array $metadata = null)
}
}

if (\function_exists('opcache_invalidate') && ini_get('opcache.enable')) {
if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) {
@opcache_invalidate($this->file, true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Util/XmlUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public static function phpize($value)
return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value;
case preg_match('/^0x[0-9a-f]++$/i', $value):
return hexdec($value);
case preg_match('/^(-|\+)?[0-9]+(\.[0-9]+)?$/', $value):
case preg_match('/^[+-]?[0-9]+(\.[0-9]+)?$/', $value):
return (float) $value;
default:
return $value;
Expand Down

0 comments on commit 991fec8

Please sign in to comment.