Skip to content

Commit

Permalink
Fix for notices related to issue #622
Browse files Browse the repository at this point in the history
  • Loading branch information
jegelstaff committed Mar 1, 2025
1 parent 13cda63 commit e6579d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/formulize/class/elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ public function getVar($key, $format = 's') {
OR $ele_type == 'textarea')
AND is_array($value)) {
$filename = $ele_type.'_'.$this->getVar('ele_handle').'.php';
$fileValue = strval(file_get_contents(XOOPS_ROOT_PATH.'/modules/formulize/code/'.$filename));
$filePath = XOOPS_ROOT_PATH.'/modules/formulize/code/'.$filename;
$fileValue = "";
if(file_exists($filePath)) {
$fileValue = strval(file_get_contents($filePath));
}
$value[0] = $fileValue ? $fileValue : $value[0];
}
}
Expand Down
6 changes: 5 additions & 1 deletion modules/formulize/class/textElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ public function getVar($key, $format = 's') {
$value = parent::getVar($key, $format);
if($key == 'ele_value' AND is_array($value)) {
$filename ='text_'.$this->getVar('ele_handle').'.php';
$fileValue = strval(file_get_contents(XOOPS_ROOT_PATH.'/modules/formulize/code/'.$filename));
$filePath = XOOPS_ROOT_PATH.'/modules/formulize/code/'.$filename;
$fileValue = "";
if(file_exists($filePath)) {
$fileValue = strval(file_get_contents($filePath));
}
$value[2] = $fileValue ? $fileValue : $value[2];
}
return $value;
Expand Down

0 comments on commit e6579d8

Please sign in to comment.