PHP notice

Undefined index: product

/var/sentora/hostdata/mihai/public_html/cloud_papionne_com/protected/controllers/MakitoController.php(284)

272         $criteria->addCondition("idExternal='" . $product['ref'] . "'");
273         $criteria->addCondition('idUser=3');
274         $productModel = Product::model()->resetScope()->find($criteria);
275 
276         if ($productModel) {
277             echo $product['ref'] . " exists";
278         }
279 
280         $xmlUrl = "https://frontal.makito.es/epages/Makito.sf/?ObjectPath=/Shops/Makito&ViewAction=ViewXML&tipocatalogo=producto&product=" . $product['ref'] . "&pagina=1&pszinternal=" . $xmlKey . "&ldl=" . $lang;
281         $xml = new JsonSerializer($xmlUrl, 0, true);
282         $product = json_decode(json_encode($xml, JSON_PRETTY_PRINT), 1);
283 
284         if ($product['product'] == "....nothing") {
285             echo " ";
286             exit;
287         }
288 
289 
290         $idExternal = $product['product']['ref'];
291         $code = $product['product']['productcode'];
292         $name = $product['product']['description'];
293         $imagesAndColors = array();
294 
295         if (array_key_exists('image', $product['product']['images'])) // only one image is defined  - see ref: 9350
296         {

Stack Trace

#12
+
 /var/sentora/hostdata/mihai/public_html/cloud_papionne_com/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2019-09-16 23:45:43 Apache Yii Framework/1.1.14
Product not found