Trying to get property 'logo' of non-object in on line 18

0

Does anyone know how to fix it?

Class model_logo extends model {

public $endereco = "";
public $endereco2 = "";

public function __construct(){
    $this->imagem();
}

public function imagem(){

    $db = new mysql();
    $exec = $db->executar("SELECT logo FROM adm_config where id='1' ");
    $data = $exec->fetch_object();       

    if($data->logo)
    {
        $this->endereco = arquivos.'img_logo/'.$data->logo;
        $this->endereco2 = arquivos.'img_logo/'.$data->logo;
    } else {
        $this->endereco = LAYOUT."img/logo.png";
        $this->endereco2 = LAYOUT."img/logo2.png";
    }

}

}

    
asked by anonymous 30.04.2018 / 05:21

0 answers