[Web-cyradm] is there a fix? "PHP Fatal error: Cannot
break/continue 1 level"
OpenMacNews
web-cyradm.20.openmacnews at spamgourmet.com
Fri Nov 5 09:05:01 CET 2004
>> > is there a known workaround/fix?
> On Fri, 2004-11-05 at 07:30, Bob Apthorpe wrote:
>> Stupid question: is there any harm in deleting the offending 'break'
>> statement?
>>
>> According to the docs, "break ends execution of the current for,
>> foreach, while, do-while or switch structure." It doesn't appear that
>> the break is in any of those structures (there's nothing for it to break
>> out of) and I'm not sure the break actually _does_ anything except throw
>> an error. FWIW, I'm using web-cyradm-0.5.4-1.tar.gz.
>>
>> Omitting the break appears to let flow-of-control pass to the end of the
>> nested if/then blocks. There doesn't seem to be any code that logically
>> follows the break so it looks like you could just eliminate it and let
>> control flow normally. Can someone more familiar with the code verify this?
-- On Friday, November 5, 2004 8:02:46 AM PST -0700 Eric Brunson <brunson at brunson.com> wrote:
> It's probably left over from when that logic was a switch/case structure
> then converted to an if/else. Deleting it would definitely be okay.
never one to scoff at an elegant "just rip it outa there !!" solution ;-) deleting the 'break' certainly seems to eliminate the immediate "Fatal Error" ...
most certainly NOT a "stupid question"! clearly, my mistaken approach was in trying to figure out how it SHOULD work, NOT that, perhaps it shouldn't be there in the first place!
thanks, gentlemen! off to the "next steps" ...
richard
More information about the Web-cyradm
mailing list