error after update PHP7

edwinfg

New Member
Hello Fabrik users,

Joomla! 3.9.2
PHP 7.3.0
Fabrik 3.9

after upgrade to PHP7 from PHP5 or to Joomla 3.9.2 from 3.9.1 I start to get this error:

syntax error, unexpected end of file
/var/www/html/comateq/plugins/fabrik_element/dropdown/dropdown.php(235) : eval()'d code:1
Call stack
#
Function Location
1 () JROOT/plugins/fabrik_element/dropdown/dropdown.php(235) : eval()'d code:1
2 PlgFabrik_ElementDropdown->getDefaultValue() JROOT/components/com_fabrik/models/element.php:1497
3 PlgFabrik_Element->getDefaultOnACL() JROOT/components/com_fabrik/models/element.php:1540
4 PlgFabrik_Element->getValue() JROOT/components/com_fabrik/models/elementlist.php:932
5 PlgFabrik_ElementList->getValue() JROOT/components/com_fabrik/models/element.php:2444
6 PlgFabrik_Element->preRenderElement() JROOT/components/com_fabrik/models/element.php:2255
7 PlgFabrik_Element->preRender() JROOT/components/com_fabrik/models/form.php:4878
8 FabrikFEModelForm->getGroupView() JROOT/components/com_fabrik/views/form/view.base.php:171
9 FabrikViewFormBase->display() JROOT/components/com_fabrik/views/form/view.html.php:37
10 FabrikViewForm->display() JROOT/libraries/src/Cache/Controller/ViewController.php:102
11 Joomla\CMS\Cache\Controller\ViewController->get() JROOT/components/com_fabrik/controllers/form.php:189
12 FabrikControllerForm->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
13 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_fabrik/fabrik.php:181
14 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
15 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
17 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
18 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

can somebody help me please?
 
It seems you have custom code in one of your dropdown elements (Advance or Options tab) which is not PHP7 compatible.
 
It seems you have custom code in one of your dropdown elements (Advance or Options tab) which is not PHP7 compatible.

Thanks for your replay, you were right. It was in option tab, I selected eval as yes and pass a default value as 2. I don't understand why this cause the problem.

In suboption I want the one with Value number 2 as a default, I activated there but I don't remember why also let it in option tab as PHP function. Maybe it is not necessary.

Thanks again.
 
Thanks for your replay, you were right. It was in option tab, I selected eval as yes and pass a default value as 2. I don't understand why this cause the problem.

If you just need the value 2, don't enable 'eval', as trying to evaluate '2' as PHP code will produce an error. It may have worked in earlier versions of PHP, but won't any more.

To be valied PHP it would have to be ...

Code:
return 2;

-- hugh
 
If you just need the value 2, don't enable 'eval', as trying to evaluate '2' as PHP code will produce an error. It may have worked in earlier versions of PHP, but won't any more.

To be valied PHP it would have to be ...

Code:
return 2;

-- hugh

Good to know, it is clear to me now. I do not know the syntax in general of PHP, I changed the server from PHP5 to PHP7 because Joomla required it. Thank you very much for your help, now it's working again.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top