I made the rookie mistake of starting my project in windows and migrating it to unbuntu. This move was forced upon me and resulted in a lot of unintended consequences. It generated a lot of errors one being fatal.
I know that the object is not null by simply doing a var_dump.Inside the var_dump the method is there. So my question: Why would this work flawlessly in a windows environment and not in the linux environment. I went through the code and fixed all my capitalization issues I think.
The code that generates the error is:
public function find($user = null) {
if ($user) {
$field = (is_numeric($user)) ? ‘id’ : ‘username’;
$data = $this->_db->get('user', array($field, '=', $user));
var_dump($data);
if ($data->count()) {
$this->_data = $data->first();
return true;
}
}
var_dump($data);
object(DB)#3 (6) { ["_pdo":“DB”:private]=> object(PDO)#4 (0) { } ["_query":“DB”:private]=> object(PDOStatement)#5 (1) { [“queryString”]=> string(31) “SELECT * FROM user WHERE id = ?” } ["_error":“DB”:private]=> bool(false) ["_result":“DB”:private]=> array(1) { [0]=> object(stdClass)#6 (8) { [“id”]=> string(2) “39” [“username”]=> string(8) “test1234” [“password”]=> string(64) “d1dcebd95402062c466eeb1e2b5e6c3b217a0fe160bc3baac86bafc9613494e9” [“salt”]=> string(32) “.JMs.ˆ~ìdÿ)7Ð §FKS¨Ê×$'å¹Yˆc¥” [“name”]=> string(0) “” [“joined”]=> string(10) “2014-11-20” [“disabled”]=> string(1) “0” [“email”]=> string(18) "[email protected]" } } ["_count":“DB”:private]=> int(1) [“error”]=> bool(false) }
return false;
}