Closed tbuerki closed 9 years ago
I've added an image (flag) to the cuisine type "Asian" and now it produces a PHP error whenever the recipe with Asian as cuisine type (currently only Dal Fry) is part of the search results.
Error message:
Undefined variable: cusine
/var/www/db_wsd/protected/controllers/RecipesController.php(2510)
2498 $criteriaTypeOfCusine->select = 'cut.CUT_ID,cut.CUT_IMG_ETAG,cut.CUTDESC' . Yii::app()->session['lang'] . $additionalSelect; 2499 $commandTypeOfCusine = $this->criteriaToCommand($criteriaTypeOfCusine); 2500 $commandTypeOfCusine->bindValues($criteriaTypeOfCusine->params); 2501 $typeOfCusine = $commandTypeOfCusine->queryAll(); 2502 if ($this->debug) { 2503 echo $commandTypeOfCusine->text . ''; 2504 var_dump($criteriaTypeOfCusine->params); 2505 } 2506 $typeOfCusineList = array(); 2507 $url = $this->createUrl("savedImage/cusineTypes"); 2508 foreach ($typeOfCusine as $row){ 2509 if(isset($row['CUT_IMG_ETAG']) && $row['CUT_IMG_ETAG'] != ''){ 2510 $value = CHtml::image($url . $row['CUT_ID'] . '.png', $cusine['name'], array('class'=>'cusineImg')) . $row['CUTDESC'.Yii::app()->session['lang']]; 2511 } else { 2512 $value = $row['CUTDESC'.Yii::app()->session['lang']]; 2513 } 2514 $typeOfCusineList[$row['CUT_ID']] = $value; 2515 } 2516 if(array_key_exists(null,$typeOfCusineList)){ 2517 $typeOfCusineList[null] = $this->trans->GENERAL_UNDEFINED; 2518 } 2519 $filters['possibleTypeOfCusine'] = $typeOfCusineList; 2520 2521 //Type 2522 $criteriaType=new CDbCriteria;
fixed
I've added an image (flag) to the cuisine type "Asian" and now it produces a PHP error whenever the recipe with Asian as cuisine type (currently only Dal Fry) is part of the search results.
Error message:
Undefined variable: cusine
/var/www/db_wsd/protected/controllers/RecipesController.php(2510)
2498 $criteriaTypeOfCusine->select = 'cut.CUT_ID,cut.CUT_IMG_ETAG,cut.CUTDESC' . Yii::app()->session['lang'] . $additionalSelect; 2499 $commandTypeOfCusine = $this->criteriaToCommand($criteriaTypeOfCusine); 2500 $commandTypeOfCusine->bindValues($criteriaTypeOfCusine->params); 2501 $typeOfCusine = $commandTypeOfCusine->queryAll(); 2502 if ($this->debug) { 2503 echo $commandTypeOfCusine->text . '
'; 2504 var_dump($criteriaTypeOfCusine->params); 2505 } 2506 $typeOfCusineList = array(); 2507 $url = $this->createUrl("savedImage/cusineTypes"); 2508 foreach ($typeOfCusine as $row){ 2509 if(isset($row['CUT_IMG_ETAG']) && $row['CUT_IMG_ETAG'] != ''){ 2510 $value = CHtml::image($url . $row['CUT_ID'] . '.png', $cusine['name'], array('class'=>'cusineImg')) . $row['CUTDESC'.Yii::app()->session['lang']]; 2511 } else { 2512 $value = $row['CUTDESC'.Yii::app()->session['lang']]; 2513 } 2514 $typeOfCusineList[$row['CUT_ID']] = $value; 2515 } 2516 if(array_key_exists(null,$typeOfCusineList)){ 2517 $typeOfCusineList[null] = $this->trans->GENERAL_UNDEFINED; 2518 } 2519 $filters['possibleTypeOfCusine'] = $typeOfCusineList; 2520
2521 //Type 2522 $criteriaType=new CDbCriteria;