[pmwiki-users] Irreproducible behavior - maybe a bug

Patrick R. Michaud pmichaud at pobox.com
Wed May 11 16:55:16 CDT 2005


On Wed, May 11, 2005 at 11:12:27PM +0200, Joachim Durchholz wrote:
> Joachim Durchholz wrote:
> 
> >Patrick R. Michaud wrote:
> >>try changing the line to read:
> >>
> >>      foreach((array)(@$MarkupTable[$id]['dep']) as $i=>$m)
> >>
> >>and see if that resolves the problem or gives a useful
> >>error message.  It would explain a lot.
> >
> >
> >No, that doesn't help.
> 
> More specifically:
>   var_dump($MarkupTable[$id]['dep']) => NULL
>   var_dump((array)$MarkupTable[$id]['dep']) => array("")
>   var_dump((array)($MarkupTable[$id]['dep'])) => array("")

Hmm, on my system:

    <?php
    
       header("Content-type: text/plain");
       print_r($MarkupTable[$id]['dep']);
       print_r((array)$MarkupTable[$id]['dep']);
       print_r((array)($MarkupTable[$id]['dep']));
    
       var_dump($MarkupTable[$id]['dep']);
       var_dump((array)$MarkupTable[$id]['dep']);
       var_dump((array)($MarkupTable[$id]['dep']));
    ?>

produces

    Array
    (
    )
    Array
    (
    )
    NULL
    array(0) {
    }
    array(0) {
    }

which is pretty much what I would expect.  It certainly
doesn't show any elements in the (array) versions...
(See http://www.pmichaud.com/sandbox/null.php)

Pm



More information about the pmwiki-users mailing list