[pmwiki-users] Fwd: A scripts/forms.php glitch

Dominique Faure dominique.faure at gmail.com
Tue Sep 12 01:29:14 CDT 2006


On 9/11/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Mon, Sep 11, 2006 at 11:23:52PM +0200, Dominique Faure wrote:
> > On 9/7/06, Dominique Faure <dominique.faure at gmail.com> wrote:
> > >Digging around a bit more, it seems that I hit a case where
> > >$FmtV['$PreviewText'] is used before been initialized (setting
> > >$FmtV['$PreviewText'] = ''; in config.php corrected this).
> > >
> > >This may be worth an official patch.
> >
> > I suspect this to be a really minor bug but I prefer to repost it,
> > since you didn't acknowledged it and the mailing list had some
> > issues...
>
> Thanks for reposting.  I'm not sure I want to patch until
> I better understand why the problem occurs; as far as I can tell
> it shouldn't ever happen.  What's the case where $PreviewText
> is used before initialization -- can you describe the steps
> in some detail, or reproduce it on pmwiki.org?
>

I isolated a bit more the problem:
On a "fresh-from-the-archive-distrib" PmWiki installation, I added the
following config.php:

  <?php if (!defined('PmWiki')) exit();
  $DefaultPasswords['admin'] = crypt('foo');
  $EnableDiag = 1;

Opened:
http://where.it.stands/pmwiki-2.1.26/pmwiki.php?n=Site.EditForm?action=edit
edited a bit, finishing with the "Save and Edit" button to obtain the
"pat=/^\(:e_preview:\)/e" message.

This behavior occurs only when $EnableDiag is set to 1.

Regards,
Dom




More information about the pmwiki-users mailing list