[pmwiki-users] Case of vanishing FmtPV

Ian Barton lists at manor-farm.org
Fri Sep 15 02:42:30 CDT 2006


I am a php neophyte, but I would assume that calling return would 
immediately exit the current function, so your $FmtPV line never gets 
called. See http://uk2.php.net/manual/en/function.return.php for more 
details.

You probably want to set the value of $FmtPV *before* calling return. HTH.

Ian.

The Editor wrote:
> Still wrestling with the case of the mysterious vanishing page variable.
> 
> In my data read markup (processed just before page variables in the
> markup table) I have this snippet that is suppose to retrieve some
> simple text from a specified log entry so it can be edited or
> whatever.
> 
> 			case "log" :
> //				return urlencode(GetLog($d,$_GET[id]));
> 				$FmtPV['$log'] = urlencode(GetLog($d,$_GET[id]));
> 				break;
> 
> When I uncomment the return line, I get exactly the text I want.  (I
> put the urlencode as a debugging measure--no special codes showed up).
>  The page variable {$log} however only shows up a blank.  With the
> urlencode, the page variable suddenly shows up as "0" (whatever that
> means). Better than blank, but not the string I want.  I've tried
> changing the page variable name. I've manually set the page variable
> to "Hello World" and it shows up in the page then as {$log}.  I'm out
> of things to try.
> 




More information about the pmwiki-users mailing list