summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_function_super_global_var.phpt
diff options
context:
space:
mode:
authorjvoisin2020-06-07 19:58:18 +0200
committerjvoisin2020-06-07 20:14:48 +0200
commit048f4b48b727935a6378d8dc74d923a674aa7da1 (patch)
treeaa06bc37c82c99375277e3af3c7a482f3a1ad002 /src/tests/disable_function/disabled_function_super_global_var.phpt
parentddaa664cd349e841f483bdc344a8e655f3a8e96e (diff)
Fix a broken test on php nightly
Apparently, php is now raising errors for non-existing keys in arrays, so we're now catching the exception to allow the test to be run.
Diffstat (limited to 'src/tests/disable_function/disabled_function_super_global_var.phpt')
-rw-r--r--src/tests/disable_function/disabled_function_super_global_var.phpt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt
index 3aa8ea1..19bb892 100644
--- a/src/tests/disable_function/disabled_function_super_global_var.phpt
+++ b/src/tests/disable_function/disabled_function_super_global_var.phpt
@@ -9,13 +9,17 @@ bla=test
9--FILE-- 9--FILE--
10<?php 10<?php
11function test(){ 11function test(){
12try {
12 echo strtoupper($_GET['bla']) . "\n"; 13 echo strtoupper($_GET['bla']) . "\n";
13} 14}
14test(); 15catch (Exception $e) { }
16catch (Error $e) { }
17}
18 test();
15$_GET['bla'] = 'test2'; 19$_GET['bla'] = 'test2';
16test(); 20test();
17?> 21?>
18--EXPECTF-- 22--EXPECTF--
19TEST 23TEST
20 24
21Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 3 25Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4