PHP 7.2 fatal errors

Bauer

Well-Known Member
Just an FYI in regards to some issues I ran into after updating to PHP7.2 over the weekend.

The PHP function 'create_function' is deprecated in PHP 7.2.
The following files in the Fabrik github zip reference this function - which causes a fatal error if running php v7.2...

media\com_fabrik\js\lib\ace\src-min-noconflict\mode-php.js
plugins\fabrik_element\cascadingdropdown\cascadingdropdown.php
plugins\fabrik_element\fileupload\fileupload.php

Also the count function has stricter standards in PHP7.2 (the arg must be an array or object).
So far, the only the error in my php error log from a fabrik file is...

warning 'count(): Parameter must be an array or an object that implements Countable' at plugins/fabrik_element/databasejoin/databasejoin.php 3436

This 'warning' error causes the fabrik function to fail and can mess up the database join value - so I'd consider it a fatal error.
 
Are you running a recent github? I've been running 7.2 for a couple of months now, and have steadily been committing fixes. The use of create_function was removed on July 1st, and replaced with closures:

https://github.com/Fabrik/fabrik/commit/78a5a066539f5a26b9471ef12d635fed25248b04

I've also fixed quite a few places where count() throws warnings, usually when it gets a null rather than empty array.

Aaaaand ... yup, I fixed that join one about 2 weeks ago, but apparently forgot to push it to github. Just did that.

https://github.com/Fabrik/fabrik/commit/715de937be851a06b2f4ec75cc1c2c76b8fb4e73

-- hugh
 
There was also a rather blatant issue with count() in the main backend fabrik.php which got fixed about the same time as the closures.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top