diff options
author | Christian Schneider | 2016-01-25 13:50:26 +0100 |
---|---|---|
committer | Christian Schneider | 2016-01-25 13:50:26 +0100 |
commit | 2e9e40bca784bda35606deadea8a4ddeaef02e94 (patch) | |
tree | ca6567e0e3f2f0edc2bc6088a2abf3a650a976e2 /it_auto_prepend.php | |
parent | dd633cc34e24d6be8b917e5114c9df5ef4d72b05 (diff) | |
download | itools-2e9e40bca784bda35606deadea8a4ddeaef02e94.tar.gz itools-2e9e40bca784bda35606deadea8a4ddeaef02e94.tar.bz2 itools-2e9e40bca784bda35606deadea8a4ddeaef02e94.zip |
Make check for syntax patch work with PHP 7 (throws exception on parse error in eval)
Diffstat (limited to 'it_auto_prepend.php')
-rw-r--r-- | it_auto_prepend.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_auto_prepend.php b/it_auto_prepend.php index 10bee36..cea5a0d 100644 --- a/it_auto_prepend.php +++ b/it_auto_prepend.php @@ -70,7 +70,7 @@ function it_initialize() # IT_HOME is recommended variable name for applications $GLOBALS['IT_HOME'] = $GLOBALS['ULTRAHOME'] = it_untaint($GLOBALS['ULTRAHOME'], TC_ALL); - $needsconvert = $GLOBALS['IT_SYNTAXCONVERTER_DIR'] !== false && !@eval("return is_array(42=>69,);"); # Check if PHP is patched to support our syntax, see http://cschneid.com/php/ + try { $needsconvert = $GLOBALS['IT_SYNTAXCONVERTER_DIR'] !== false && !@eval("return is_array(42=>69,);"); } catch (Error $needsconvert) {} # Check if PHP is patched to support our syntax, see http://cschneid.com/php/ if ($needsconvert && !$GLOBALS['IT_SYNTAXCONVERTER_DIR']) { |