guguk
Well-known member
Hello guys,
My friend has a website which created with CodeIgniter. And the website getting 500 error. I checked htaccess and error log. There is no problem with htaccess but when I checked error log and it has PHP Fatal Error:
PHP Fatal error: Call to a member function result() on boolean in .../application/models/CommonModel.php on line 18
When i looked up that line:
Line 18 is
Im not expert of PHP so could you please help me how to fix that?
Thnx
My friend has a website which created with CodeIgniter. And the website getting 500 error. I checked htaccess and error log. There is no problem with htaccess but when I checked error log and it has PHP Fatal Error:
PHP Fatal error: Call to a member function result() on boolean in .../application/models/CommonModel.php on line 18
When i looked up that line:
PHP:
public function getLanguages()
{
$response = array();
$response['list'] = $this->db->where('status',true)->get('languages')->result();
$response['default'] = $this->db->where('default',1)->get('languages')->row();
foreach ($response['list'] as $key => $value) {
$response['codes'][] = $value->code;
}
return $response;
}
Line 18 is
PHP:
$response['list'] = $this->db->where('status',true)->get('languages')->result();
Thnx