[pmwiki-users] Error on Snippets.Lists
Patrick R. Michaud
pmichaud at pobox.com
Mon Oct 16 14:57:49 CDT 2006
On Mon, Oct 16, 2006 at 02:02:31PM -0400, The Editor wrote:
> On 10/16/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> > > This is a very important ZAP feature--but I can't seem to get it to
> > > work on my server. Works perfect on my home setup. Must be a php
> > > setting? No clue the connection with pagelist.php. Also, not sure
> > > exactly what htmlspecialchars() is doing. Any thoughts?
> >
> > For some reason there appears to be an option value being passed
> > to the pagelist functions that contains an array instead of a
> > normal string.
> >
>
> Actually, pagelist is called in the sidebar... Hmmm. When the sidebar
> pagelist is disabled, the form seems to submit properly...
Aha! It's the same bug yet again. (:pagelist:) accepts arguments
coming from $_REQUEST (i.e., a form or a url), and so if any of
those parameters are arrays then the pagelist options receive an
array, and it gets the error when it tries to set the {$$option}
page variables in pagelist templates.
I'll fix this momentarily, in two ways. First, (:pagelist:)
will have a "request=0" option that says "don't merge values
from a form or url".
Second, the {$$option} variables will become smart enough to
deal with arrays.
I'm wondering if the "request=0" option should be the default
for (:pagelist:). I don't know how many people are relying on
the fact that (:pagelist:) accepts values from a form or url.
But it seems that people are surprised when it does, so perhaps
the default should be that it doesn't and a special request=1
option is required to have it fold in the request options.
> It is strange that it works at home and not at my server. Could it be
> a php setting that is glitching here, but not at home?
PHP 5 is a lot more strict about array handling than PHP 4, so it
could be a version or setting difference.
Pm
More information about the pmwiki-users
mailing list