Error

Call to a member function getGallery() on null

/var/www/coasul.com.br/nossos-negocios-implementos-produto.php(8)

01 <?php include("gzip/gzipHTML.php"); ?>
02 
03 <?php
04 $produto = Implemento::model()->findByPk($_GET['idproduto'], array('condition' => 'habilitar = 1'));
05 
06 $categoria = ImplementoCategoria::model()->findByPk($_GET['idcategoria'], array('condition' => 'habilitar = 1'));
07 
08 $fotos = $produto->galeria->getGallery()->galleryPhotos;
09 
10 ?>
11 <!doctype html>
12 
13 <html lang="pt-br">
14 
15 <head>
16     <?php //include("header_nocache.php"); ?>
17     <?php include("header_cache.php"); ?>
18     <?php include("header.php"); ?>
19     <title>Coasul - Implementos Agrícolas - <?= Util::formataTexto($categoria->nome) ?> - <?= Util::formataResumo($produto->nome,20) ?> </title>
20 </head>

Stack Trace

#0
+
–
 /var/www/coasul.com.br/RequestManager.php(172): require_once()
167             Utf8::encode($html);
168             echo $html;
169             exit;
170         }
171 
172         require_once($require_file);
173         exit;
174 
175     }
176 
177 }
#1
+
–
 /var/www/coasul.com.br/index.php(61): RequestManager->run(array("/" => "inicial.php", "/index" => "inicial.php", "/inicial" => "inicial.php", "/sobre" => "sobre.php", ...))
56     '/politica-de-privacidade'=>'politica-de-privacidade.php',
57     '/salvar-aceite'=>'salva-cookies.php',
58 
59     '/404'=>'404.php',
60 );
61 $request_manager->run($rotas);
62 ?>
2024-03-29 01:34:20 Apache/2.4.18 (Ubuntu) Yii Framework/1.1.13