Bug #10695: Class Properties are not accepted by for each structures

From: Date: Mon, 07 May 2001 00:16:49 +0000
Subject: Bug #10695: Class Properties are not accepted by for each structures
Groups: php.dev 
Request: Send a blank email to php-dev+get-54169@lists.php.net to get a copy of this message
From: estephano@estephano.de Operating system: Linux Redhat 6.2 PHP version: 4.0.4pl1 PHP Bug Type: Class/Object related Bug description: Class Properties are not accepted by for each structures Hello. I have got a "standard" install of PHP 4.0.4pl1. So there is nothing special about it. Here is the code extract: #$result Data is successfully retrieved from mysql database) class auth_user { var $md_paketnummern; function auth_user($username,$password,$database,$auth_table,$conn_id) { $this->md_paketnummern=explode("|",$result[pakete]); } } class fetch_pakete { function fetch_pakete(){ # Now comes the LINE!!! foreach($newuser->md_paketnummern as $arraykey => $paketnummern){ echo $paketnummern; } } } Now I call $newuser = new auth_user; then: netpaket = new fetch_pakete; When I replace $newuser->md_paketnummern with an argument, it works fine. With this version it does not. -- Edit Bug report at: http://bugs.php.net/?id=10695&edit=1

« previous php.dev (#54169) next »