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);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php