Re: [PHP] redefine a define ...

2012-08-25 Thread Lester Caine
Ashley Sheridan wrote: I think the point is that the code is relying on overriding the constants, so that wouldn't help at all. I think the best thing would be to re-write the code, constants are never meant to be treated like that, it's entirely the opposite of what a constant is. I've 45 lang

Re: [PHP] redefine a define ...

2012-08-25 Thread Ashley Sheridan
On Sat, 2012-08-25 at 15:17 -0400, Matt Neimeyer wrote: > Can you just switch the order? > > Instead of... > >define("SOME_CONSTANT","Generic Value"); >define("SOME_CONSTANT","Override Value"); > > Why not do... > >define("SOME_CONSTANT","Override Value"); >if(!defined("SOME_CO

Re: [PHP] redefine a define ...

2012-08-25 Thread Matt Neimeyer
Can you just switch the order? Instead of... define("SOME_CONSTANT","Generic Value"); define("SOME_CONSTANT","Override Value"); Why not do... define("SOME_CONSTANT","Override Value"); if(!defined("SOME_CONSTANT")) { define("SOME_CONSTANT","Generic Value"); } This should avoid any r

Re: [PHP] redefine a define ...

2012-08-25 Thread Matijn Woudt
Op 25 aug. 2012 21:03 schreef "Adam Richardson" het volgende: > > On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine wrote: > > What I was not expecting was a string of 'Notices:' complaining about the > > redefines. So how does one get around this message? One can't 'if defined' > > as the string nee

Re: [PHP] redefine a define ...

2012-08-25 Thread Adam Richardson
On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine wrote: > What I was not expecting was a string of 'Notices:' complaining about the > redefines. So how does one get around this message? One can't 'if defined' > as the string needs to be replaced with the more appropriate one. I would > say, why is th

[PHP] redefine a define ...

2012-08-25 Thread Lester Caine
I know the response that I will get on the internals list, so I'll put this one past readers here ... I've just switched to overhauling a commerce package extension to the framework that I'm upgrading to be E_STRICT complaint, and I've hit a little snag. The original designers took the approac