note 82638 deleted from ref.xml by danbrown

From: Date: Wed, 03 Mar 2010 18:56:41 +0000
Subject: note 82638 deleted from ref.xml by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166630@lists.php.net to get a copy of this message
Note Submitter: galen dot senogles at gmail dot com ---- I used shawn's code that is an ongoing fix/update of a very nice php 4 & 5 compatible class. It works great, only it kept giving me errors when the array isn't set, (I have errors set to show all). <?php // Here is the old function that gave errors: function makeChildNode() { if (!is_array($this->pointer['child_nodes'])){ $this->pointer['child_nodes'] = array(); } return count($this->pointer['child_nodes']); } // Here is the new function that does not spit errors: function makeChildNode() { if (!isset($this->pointer['child_nodes'])){ $this->pointer['child_nodes'] = array(); } return count($this->pointer['child_nodes']); } ?>

« previous php.notes (#166630) next »