Extension talk:Control Structure Functions

PHP error, and blank page, with Expr.php
This happens when using ParserFunctions and ControlStructures2, or LeftOverParserFunctions and ControlStructures - on 1.12alpha. Either way, I get this message in my PHP logs: [27-Jan-2008 11:05:42] PHP Warning: end [function.end]: Passed variable is not an array or object in /srv/sites/ddowiki.net/ddowiki.net/wiki/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 246 [27-Jan-2008 11:05:42] PHP Fatal error: Call to undefined method ExprParser::addmessages in /srv/sites/ddowiki.net/ddowiki.net/wiki/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 105 Any help appreciated, Thanks, Elliottcable 16:09, 27 January 2008 (UTC)


 * The same thing happened with me. --79.76.105.219 23:53, 23 February 2008 (UTC)


 * Extension:Character Escapes (and therefore Control Structure Functions) is obsolete for version 1.12alpha. They've changed the way the preprocessor works, so escaping is no longer needed.  Except for loops, the latest version of meta:Help:ParserFunctions under 1.12alpha does the same thing as control structures functions without the need for character escapes.  If you need loop functionality, I've made the Loops extension to take advantage of the new preprocessor, so it also doesn't need character escapes.  Hope this helps.  —Sledged (talk) 01:37, 24 February 2008 (UTC)

oops in code when using the '2' version (for alongside parser functions)
if you use the ControlStructureFunctions2 code, and want while/dowhile with ifeq2, the code won't work. While I fixed it in a different way, it's likely that just changing lines containing code like if ( $ifFuncName == 'ifeq2' ) to if ( $ifFuncName == 'ifeq' )

will take care of it

Warning: end [function.end]: Passed variable is not an array or object in ...
My MediaWiki 1.15.1 is using Control Stucture Functions with "caracter excapes" and "LO Parser Functions". For each page with the language template setup, I get 4 lines of warning messages at the top left of web browser as below:

Warning: end [function.end]: Passed variable is not an array or object in $IP/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 434

Warning: end [function.end]: Passed variable is not an array or object in $IP/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 434

Warning: end [function.end]: Passed variable is not an array or object in $IP/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 434

Warning: end [function.end]: Passed variable is not an array or object in $IP/extensions/ControlStructureFunctions/ControlStructureFunctions.php on line 559

The very weird thing is the warning messages disappear when I hit Refresh (or F5), and they come back if I refresh again. It cycles.

When I look at the line 434 and line 559 in the ControlStructureFunctions.php, they are all the same which is ... end( $parser->mArgStack ) );

Any idea would be greatly appreciated!