Anyone know why this isn't safe?
| From: | Brian Shire | Date: | Thu, 28 Sep 2006 17:09:16 +0000 |
| Subject: | Anyone know why this isn't safe? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-25866@lists.php.net to get a copy of this message | ||
Ran into a problem with the following APC code change. I'm not seeing the error message on duplicate function definitions in different files when compiled/cached individually then both included in another file. ie: file a.php and file b.php both contain the function foo(). If I request and cache in APC file a.php and b.php individually but then include them both in c.php, I won't get a duplicate function error (as it's commented out in APC). Can someone help fill me in on why this isn't always valid to have this error here?
Commit message was....
"This check isn't always valid here"
http://cvs.php.net/viewvc.cgi/pecl/apc/apc_main.c?r1=3.65&r2=3.66
--- apc_main.c 2005/12/15 08:20:07 3.65
+++ apc_main.c 2005/12/15 17:22:04 3.66
@@ -28,7 +28,7 @@
*/
-/* $Id: apc_main.c,v 3.65 2005/12/15 08:20:07 rasmus Exp $ */
+/* $Id: apc_main.c,v 3.66 2005/12/15 17:22:04 rasmus Exp $ */
#include "apc_php.h"
#include "apc_main.h"
@@ -79,7 +79,7 @@
NULL);
if (status == FAILURE) {
- zend_error(E_ERROR, "Cannot redeclare %s()", fn.name);
+ /* zend_error(E_ERROR, "Cannot redeclare %s()", fn.name); */
}
return status;-shire