alexbilbie/codeigniter-mongodb-library — Issue #43: where_near() errors
Author: gerardramos
Created: 2012-02-26 07:01:09+00:00
State: open

Fatal error: Call to undefined method Mongo_db::__where_init() line 444

```php
function where_near($field = '', $co = array())
{
$this->__where_init($field);
$this->where[$what]['$near'] = $co;
return ($this);
}
```
Changing $this->__where_init($field); to $this->_where_init($field); gets past that error.

After removing the underscore, I'm seeing an Undefined variable error: what on this line:

$this->where[$what]['$near'] = $co;

Should $what be changed to $field? should where be wheres?