com php-src: Fix issue with global fallback when not in global space: Zend/tests/use_function/no_global_fallback2.phpt
| From: | Ferenc Kovacs | Date: | Fri, 30 Aug 2013 15:53:57 +0000 |
| Subject: | com php-src: Fix issue with global fallback when not in global space: Zend/tests/use_function/no_global_fallback2.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74272@lists.php.net to get a copy of this message | ||
Commit: d7e3aca9c96e93acfee2deeeb7b481cadd28438d
Author: Anthony Ferrara <ircmaxell@gmail.com> Fri, 30 Aug 2013 11:53:57 -0400
Parents: e14a769c56f45be26f32506483a7dff5b447fbb7
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d7e3aca9c96e93acfee2deeeb7b481cadd28438d
Log:
Fix issue with global fallback when not in global space
Changed paths:
A Zend/tests/use_function/no_global_fallback2.phpt
Diff:
diff --git a/Zend/tests/use_function/no_global_fallback2.phpt
b/Zend/tests/use_function/no_global_fallback2.phpt
new file mode 100644
index 0000000..5d012c1
--- /dev/null
+++ b/Zend/tests/use_function/no_global_fallback2.phpt
@@ -0,0 +1,18 @@
+--TEST--
+non-existent imported functions should not be looked up in the global table
+--FILE--
+<?php
+
+namespace {
+ function test() {
+ echo "NO!";
+ }
+}
+namespace foo {
+ use function bar\test;
+ test();
+}
+
+?>
+--EXPECTF--
+Fatal error: Call to undefined function bar\test() in %s on line %d