function issues in a class

From: Date: Tue, 06 Nov 2001 03:53:00 +0000
Subject: function issues in a class
Groups: php.general 
Request: Send a blank email to php-general+get-73534@lists.php.net to get a copy of this message
Why is it that when I call an outside function (say a string routine like substr) from a class I've made, I'll always get an Internal Server Error (#500). That doesn't make much sense... Snippet: class xml { function tag_close($parser,$tag) { if ($tag == "ARTICLE") { if ($this->xmlInArticle) { $this->news[$this->newscount]->theURL = ($this->xmlURL); $atemp = ($this->xmlDate); $themonths = array('January'=>1, 'February'=>2, 'March'=>3, 'April'=>4, 'May'=>5, 'June'=>6, 'July'=>7, 'August'=>8, 'September'=>9, 'October'=>10, 'November'=>11, 'December'=>12, 'Jan'=>1, 'Feb'=>2, 'Mar'=>3, 'Apr'=>4, 'May'=>5, 'Jun'=>6, 'Jul'=>7, 'Aug'=>8, 'Sep'=>9, 'Oct'=>10, 'Nov'=>11, 'Dec'=>12); $month = $themonths[substr($atemp,0,3)]; ... } Runs fine with the substr line remmed... otherwise, Internal Server Error. Code works fine outside a class. Help? -- Garett Nell

« previous php.general (#73534) next »