CodeIgniter Forums
MongoCollection::update() Warning - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: MongoCollection::update() Warning (/showthread.php?tid=67927)

MongoCollection::update() Warning - balasourav - 04-25-2017

Am Using Codeigniter with mongodb. I got this Following Erro when i update my code. 

A PHP Error was encountered
Severity: Warning
Message: MongoCollection::update(): The value of the 'w' option either needs to be a integer or string
Filename: libraries/Mongo_db.php
Line Number: 1241
File: /localhost/mongo/application/libraries/Mongo_db.php
Line: 1241
Function: update

File: /[font=Lato, sans-serif]localhost/mongo/application/models/Login_model.php
Line: 80
Function: update[/font]

File: [font=Lato, sans-serif]/localhost/mongo/application/controllers/Login_Controller.php
Line: 91
Function: updateUserDetails[/font]

File: [font=Lato, sans-serif]/localhost/mongo/index.php
Line: 315
Function: require_once[/font]

What can i do for this type of warning. And This Error Only Occur in live server.

My update Coding is - 
[font=Courier New]$userId    = '58ff651dd98a860c15000029';
$data = array('PROFILE_PHOTO'=>$picName);
$this->mongo_db->where('_id', new MongoId($userId))->set($data)->update('user_details');