ID: 9643 Updated by: stas Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Class/Object related Assigned To: Comments: Could you please describe in more detail what happens and what the problem is? Also note that when you are using foreach, it operates on the copy of the data, not the data itself. So if you modify it, the change won't be made in the original data. Previous Comments: --------------------------------------------------------------------------- [2001-03-08 20:07:48] [EMAIL PROTECTED] Also running Zend optimiser 1.0. Removing the optimiser makes no difference to the outcome. The problem should hopefully be outlined in the cut and paste of the code below. There are no other operations occurring on any of the instantiated objects at the time: ----------------------------- $crList = $this -> getLinkedCRs (); // method returns an array of instantiated objects (CRRecord class). foreach ($crList as $cr) { if (!$cr -> okToClose ()) // method returns a Boolean, and sets a Boolean data member in the cr object. { return false; } } foreach ($crList as $cr) { // Previously set Boolean data member now appears to no longer be set. $cr -> okToClose (); // Inserting the method call in again here ensures that the following method call works. $cr -> close ($changeBy); // method operates only if the previously set Boolean data member is true. } --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9643&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]