svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c
| From: | Hannes Magnusson | Date: | Tue, 16 Aug 2011 10:46:49 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65861@lists.php.net to get a copy of this message | ||
bjori Tue, 16 Aug 2011 10:46:49 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=315002
Log:
Improve errormessage on wrong use statements
Changed paths:
U php/php-src/branches/PHP_5_4/Zend/zend_compile.c
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-08-16 10:44:47 UTC (rev 315001)
+++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2011-08-16 10:46:49 UTC (rev 315002)
@@ -6647,6 +6647,9 @@
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use",
Z_STRVAL_P(ns), Z_STRVAL_P(name));
}
if (warn) {
+ if (!strcmp(Z_STRVAL_P(name), "strict")) {
+ zend_error(E_COMPILE_ERROR, "You seem to be trying to use a different language...");
+ }
zend_error(E_WARNING, "The use statement with non-compound name '%s' has no
effect", Z_STRVAL_P(name));
}
efree(lcname);
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2011-08-16 10:44:47 UTC (rev 315001)
+++ php/php-src/trunk/Zend/zend_compile.c 2011-08-16 10:46:49 UTC (rev 315002)
@@ -6647,6 +6647,9 @@
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use",
Z_STRVAL_P(ns), Z_STRVAL_P(name));
}
if (warn) {
+ if (!strcmp(Z_STRVAL_P(name), "strict")) {
+ zend_error(E_COMPILE_ERROR, "You seem to be trying to use a different language...");
+ }
zend_error(E_WARNING, "The use statement with non-compound name '%s' has no
effect", Z_STRVAL_P(name));
}
efree(lcname);