[development] $book_node->parent blues

Bèr Kessels ber at webschuur.com
Sun Jul 16 15:15:49 UTC 2006


Op zondag 16 juli 2006 16:53, schreef Bèr Kessels:
> As I can hardly beleive that I am the first to bump into this: Am I missing
> an obvious point? Is there an issue for this if it really is like this?

It seems I am wrong. And I am flabbergasted. But my problem is solved. Somehow 
some odd 'feature' in PHP does not allow you to check for items in trhe same 
if. 
 if ($node = node_load($nid) && $node->parent) {}
evaluates false, while a nested IF evaluates as expected.
 if ($node = node_load($nid)) { if ($node->parent) {} } 

Guess I completely misunderstood the evaluation in PHP :p

Bèr
-- 
 [ Bèr Kessels | Drupal services www.webschuur.com ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060716/74a81355/attachment.pgp


More information about the development mailing list