summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2016-01-25 13:50:26 +0100
committerChristian Schneider2016-01-25 13:50:26 +0100
commit2e9e40bca784bda35606deadea8a4ddeaef02e94 (patch)
treeca6567e0e3f2f0edc2bc6088a2abf3a650a976e2
parentdd633cc34e24d6be8b917e5114c9df5ef4d72b05 (diff)
downloaditools-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)
-rw-r--r--it_auto_prepend.php2
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'])
{