# Anyone know why this isn't safe?

- Thread: https://externals.io/message/25866
- Original archive: https://news-web.php.net/php.internals/25866
- Started by Brian Shire on 2006-09-28T17:09:16+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #25866 — Brian Shire — 2006-09-28T17:09:16+00:00

URL: https://externals.io/message/25866#25866

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
