[pmwiki-users] strange error messages
Patrick R. Michaud
pmichaud at pobox.com
Thu Sep 8 17:08:22 CDT 2005
On Thu, Sep 08, 2005 at 11:00:38PM +0100, Hans wrote:
>
> > if(@$rpage['text']=='') {$HTMLStylesFmt[] = .......
>
> >> Thanks! I fixed this and updated the skin.php files and
> >> uploaded new gemini.zip and fixflow.zip
>
> > Installed on pmwiki.org.
>
> Thank you! Unfortunately it still shows the error message on the Test
> group with Gemini skin. What could be missing?
Ah, I didn't see the ".=" concatenators there... You'll need to switch
if (PageExists($prb)) $rpage = ReadPage($prb);
if (PageExists($grb)) $rpage .= ReadPage($grb);
if (PageExists($srb)) $rpage .= ReadPage($srb);
if(@$rpage['text']=='') {...}
to something like
if (PageExists($prb)) $rpage = ReadPage($prb);
if (PageExists($grb)) @$rpage .= ReadPage($grb);
if (PageExists($srb)) @$rpage .= ReadPage($srb);
if(@$rpage['text']=='') {...}
When $prb doesn't exist, then PHP is complaining because
you're concatenating something onto $rpage which hasn't been
given a value yet.
Another way to all of the @-signs is to make sure $rpage
is initialized, as in:
$rpage = array();
if (PageExists($prb)) $rpage = ReadPage($prb);
if (PageExists($grb)) $rpage .= ReadPage($grb);
if (PageExists($srb)) $rpage .= ReadPage($srb);
if($rpage['text']=='') {...}
Pm
More information about the pmwiki-users
mailing list