From: Hannes Magnusson Date: Tue, 16 Aug 2011 10:46:49 +0000 (+0000) Subject: Improve errormessage on wrong use statements X-Git-Tag: php-5.4.0beta1~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=133596b6f7c48a4e6de32e854c34859e6dfd1278;p=php Improve errormessage on wrong use statements --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 774c1e85eb..92617a6a76 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6647,6 +6647,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{ 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);