diff --git a/module/Application/view/partial/basicformfield.phtml b/module/Application/view/partial/basicformfield.phtml index f51d71a..34245da 100644 --- a/module/Application/view/partial/basicformfield.phtml +++ b/module/Application/view/partial/basicformfield.phtml @@ -119,26 +119,27 @@ switch($oField->type) { * Upload field */ case 'upload': - $sFile = $this->oItem->getTextField($oField->fieldkey); - if($sFile != '') { - $sExt = pathinfo($sFile)['extension']; - switch ($sExt) { - case 'jpg': - case 'jpeg': - case 'gif': - case 'png': - case 'svg': - echo ''; - echo $sFile; - break; - default: - echo $sFile; - break; + if(isset($this->oItem)) { + $sFile = $this->oItem->getTextField($oField->fieldkey); + if ($sFile != '') { + $sExt = pathinfo($sFile)['extension']; + switch ($sExt) { + case 'jpg': + case 'jpeg': + case 'gif': + case 'png': + case 'svg': + echo ''; + echo $sFile; + break; + default: + echo $sFile; + break; + } } } ?> - /> + />