[pmwiki-devel] Illegal offset error and zap...

Patrick R. Michaud pmichaud at pobox.com
Fri Mar 30 08:42:54 CDT 2007


On Fri, Mar 30, 2007 at 09:04:09AM -0400, The Editor wrote:
> I've had a zap user report this error message, but I can't replicate
> it or identify any possible cause...  I've searched the php docs and
> nothing remotely connected to what ZAP is doing.
> 
>              Illegal offset type in C:\Inetpub\pmWiki\cookbook\zap.php
> Below is his post to me.  
> [...]
> : Warning: Illegal offset type in C:\Inetpub\pmWiki\cookbook\zap.php on line 62

Okay, let's look at line 62 of zap.php:

  if (isset($_POST[$f])) 
    ZAPwarning("The \"$field\" field cannot be processed this way. ");

What's the value of $f?  Looking above (line 44), we see that $f is
an array:

  $f = explode(",", $ZAParray['passdata']);

Since an array ($f) cannot be used as the index for another array ($_POST),
you're getting the "Illegal offset type ..." warning.

Pm



More information about the pmwiki-devel mailing list