[Web-cyradm] is there a fix? "PHP Fatal error: Cannot break/continue 1 level"

Bob Apthorpe apthorpe+cyradm at cynistar.net
Fri Nov 5 08:30:40 CET 2004


OpenMacNews wrote:
> hi all,
> 
> immediately after a successful (apparently -- i can subsequently create 
> a domain ...) login SUBMIT to web-cyradm with admin user & pwd, i see 
> the following in my apache error log:
> 
> PHP Fatal error:  Cannot break/continue 1 level in 
> /var/www/WebCyrAdm/auth.inc.php on line 54, referer: 
> http://testserver.internal.testdomain.com/webcyradm/index.php
> 
> looking in index.php
> 
> 51:          header ("Location: index.php");
> 52:
> 53:          //print "Authentication sucessful";
> 54:          break;
> 55:     } else {
> 56:          // Log login failure
> 57:          $fp = fopen($LOG_DIR . "web-cyradm-login.log", "a");
> 
> it's, in fact, referring to a 'break' ...
> 
> i've tried this with both release & CVS-head; same behavior.
> 
[...]
> 
> is there a known workaround/fix?

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?

hth,

-- Bob


More information about the Web-cyradm mailing list