From: Jakub A. <jak...@se...> - 2003-03-08 19:46:07
|
Mitra, you are very right. I didn't want to include the whole util.php3 because of performance, but perhaps it is not as important. But about get_aamenus(): there is no reason why one script should include several menu definitions. I didn't encounter this problem, where was it? As to the PHP version: I am developing on 4.1.1. Jakub -----Original Message----- From: apc...@li... [mailto:apc...@li...] On Behalf Of Mitra Sent: Friday, March 07, 2003 10:32 PM To: apc...@so... Subject: [Apc-aa-coders] Redefining functions Jakub - I'm pulling this to a separate thread since its not really connected to the filler problems the problem of defining new_id twice is fixed in CVS (if (! function_exists ("new_id"))). Can you perhaps do an update? I get always this error on refresh. We are seeing a lot of problems with multiply defined functions, l ately - I think they are becoming visible because the latest PHP doesn't allow redefining functions. It seems to me that we have a big weakness in apc-aa if we redefine functions, take this example of new_id, the version in filler.php3 is wrong, it misses a bug-fix that Honza made on the version in util.php3. It also makes it really hard to find bugs because it is not always clear which version of a function is being used. There was also an example reported to do with aa-menus (defined in menu.php3 and modules/site/menu.php3) recently - a message on 1-march that was never dealt with. Instead of redefining new_id, wouldn't it have been better to include util.php3, I've deleted the code from post2shtml.php3 and added require_once util.php3 I've done this and resubmitting to CVS. Could someone (is site module Jakub or Honza?) fix aa_menus. I'd also suggest upgrading your version of PHP so that you see these problems on your dev machine. - Mitra -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-0722 Life is a Mystery to be Lived, not a Problem to be Solved |