MongoDB\Exception\UnexpectedValueException [ 0 ]: count command did not return a numeric "n" value

/www/coin-brothers.com/vendor/mongodb/mongodb/src/Operation/Count.php [ 159 ]

154         $cursor = $server->executeReadCommand($this->databaseName, new Command($this->createCommandDocument()), $this->createOptions());
155         $result = current($cursor->toArray());
156 
157         // Older server versions may return a float
158         if ( ! isset($result->n) || ! (is_integer($result->n) || is_float($result->n))) {
159             throw new UnexpectedValueException('count command did not return a numeric "n" value');
160         }
161 
162         return (integer) $result->n;
163     }
164 
  1. /www/coin-brothers.com/vendor/mongodb/mongodb/src/Collection.php [ 277 ] » MongoDB\Operation\Count->execute(arguments)

  2. APPPATH/classes/Model/CMarketplace.php [ 431 ] » MongoDB\Collection->count(arguments)

  3. APPPATH/classes/Model/User.php [ 883 ] » Model_CMarketplace->get_market_count(arguments)

  4. APPPATH/views/nav.php [ 5 ] » Model_User->get_statistic()

  5. APPPATH/views/header.php [ 65 ] » require_once(arguments)

  6. SYSPATH/classes/Kohana/View.php [ 61 ] » include(arguments)

  7. SYSPATH/classes/Kohana/View.php [ 348 ] » Kohana_View::capture(arguments)

  8. SYSPATH/classes/Kohana/View.php [ 228 ] » Kohana_View->render()

  9. APPPATH/classes/Controller/Marketplace.php [ 123 ] » Kohana_View->__toString()

  10. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Marketplace->action_market_search()

  11. {PHP internal call} » Kohana_Controller->execute()

  12. SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)

  13. SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  14. SYSPATH/classes/Kohana/Request.php [ 986 ] » Kohana_Request_Client->execute(arguments)

  15. DOCROOT/index.php [ 117 ] » Kohana_Request->execute()

Environment