]> git.joonet.de Git - adminer.git/commitdiff
Save bytes
authorJakub Vrana <jakub@vrana.cz>
Tue, 9 Feb 2021 19:42:25 +0000 (20:42 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 9 Feb 2021 19:42:25 +0000 (20:42 +0100)
adminer/drivers/mongo.inc.php

index d0b4bea34d577f2340a6c9ba87401bc13bd83596..07e47162eb935c83d84b8015337e1b46e5416592 100644 (file)
@@ -177,7 +177,6 @@ if (isset($_GET["mongo"])) {
                                $class = 'MongoDB\Driver\BulkWrite';
                                $bulk = new $class(array());
                                $bulk->delete($where, array('limit' => $limit));
-                               var_dump($where);
                                return $connection->executeBulkWrite("$db.$table", $bulk, 'getDeletedCount');
                        }
 
@@ -186,7 +185,7 @@ if (isset($_GET["mongo"])) {
                                $db = $connection->_db_name;
                                $class = 'MongoDB\Driver\BulkWrite';
                                $bulk = new $class(array());
-                               if (isset($set['_id']) && empty($set['_id'])) {
+                               if ($set['_id'] == '') {
                                        unset($set['_id']);
                                }
                                $bulk->insert($set);