Bug #53047 [Opn->Csd]: Example code refers to undefined variable

From: Date: Tue, 19 Oct 2010 04:33:33 +0000
Subject: Bug #53047 [Opn->Csd]: Example code refers to undefined variable
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5245@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53047&edit=1 ID: 53047 Updated by: kalle@php.net Reported by: jeff at lyonbros dot com Summary: Example code refers to undefined variable -Status: Open +Status: Closed Type: Bug Package: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant -Assigned To: +Assigned To: kalle Block user comment: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-10-19 06:33:20] kalle@php.net Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=304497 Log: Fixed bug #53047 (Example code refers to undefined variable) # Also fixed the changelog order ------------------------------------------------------------------------ [2010-10-12 22:30:09] jeff at lyonbros dot com Description: ------------ See the page at http://us3.php.net/manual/en/mongocollection.remove.php Scroll down to Example #1 $uranium->remove(array('type' => 94), array("justOne" => true)); $uranium is undefined in the example. It needs to be a MongoCollection object for the example to be functional. Test script: --------------- <?php $radioactive = $db->radioactive; // count how much more plutonium there is $remaining = $radioactive->count(array('type' => 94)); $halflife = $remaining/2; // remove half of it while ($halflife > 0) { $uranium->remove(array('type' => 94), array("justOne" => true)); $halflife--; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53047&edit=1

« previous php.doc.bugs (#5245) next »