[pmwiki-users] strange error messages

Hans design at softflow.co.uk
Thu Sep 8 08:36:41 CDT 2005

Thursday, September 8, 2005, 1:20:30 PM, Patrick wrote:
> Here it's warning that the $rpage variable is being used when it hasn't
> been initialized.  In my scripts where I know this usage is okay I usually
> suppress the warnings by placing an "@" in front of the expression.

I better ask since I am not quite sure:
Existing codeblock:

   # do not show rightbar box if RightBar is empty
   global $HTMLStylesFmt;
   $prb = FmtPageName('$FullName-RightBar',$pagename);
   $grb = FmtPageName('$Group.RightBar',$pagename);
   $srb = FmtPageName('$SiteGroup.RightBar',$pagename);
   if (PageExists($prb)) $rpage = ReadPage($prb);
   if (PageExists($grb)) $rpage .= ReadPage($grb);
   if (PageExists($srb)) $rpage .= ReadPage($srb);
   if($rpage['text']=='') {$HTMLStylesFmt[] = " #rightbar { display:none } \n";};

Is it sufficient to write the last line as this:

   if(@$rpage['text']=='') {$HTMLStylesFmt[] = .......



More information about the pmwiki-users mailing list