From ba819856bba5372c5624f89232f08d4b7081d713 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 18 Nov 2010 19:10:04 +0000 Subject: [PATCH] addendum on collections w/out _ids git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305515 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocollection/find.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reference/mongo/mongocollection/find.xml b/reference/mongo/mongocollection/find.xml index 5cd61a60d1..2ef13415fb 100644 --- a/reference/mongo/mongocollection/find.xml +++ b/reference/mongo/mongocollection/find.xml @@ -129,6 +129,13 @@ $array = iterator_to_array($cursor); the results into memory, so do not do this for result sets that are larger than memory! + + Also, certain system collections do not have an _id + field. If you are dealing with a collection that might have documents + without _ids, pass &false; as the second argument to + iterator_to_array (so that it will not try to use the + non-existent _id values as keys). +