Pregunta

Severity: Notice --> Trying to get property of non-object libraries\mongo_db.php 755

When using ion_auth with mongodb . Assessing collection user . it retrieves as a non-object.. any fixes ??

¿Fue útil?

Solución

SOLVED !! Here is the fix to avoid non-object error. Mongo.php

public function __construct( $config = array(), $connect = true ) {
   if ( ! class_exists('\Mongo') ) {
       // @codeCoverageIgnoreStart
       throw new \My_Exception('The MongoDB PECL extension has not been
       installed or enabled');
       // @codeCoverageIgnoreEnd
   }
   $this->setConfig($config, $connect);
}

assign $config = array(). So that result is always an array.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top