Small error after upgrading to PHP 7.1: Use of undefined constant params

Mustafa_s

Member
Hello Fabrik team,

I upgraded to PHP 7.1, Joomla 3.9.1 and Fabrik 3.9, however, ever since the upgrade I'm getting the following error message on a CALC element: Use of undefined constant params - assumed 'params'.

This is the screenshot of the frontend error message (with MAX error reporting and Debug on): https://i.imgur.com/HyHZtqd.png

This is the screenshot of the backend of the CALC element: https://i.imgur.com/yWQYpJi.png

Anyone can guide me in the right direction? What am I doing wrong here?

Thanks!
 
As in the error message: Use of undefined constant params...
$search = params;
What should params be, the string 'params'?
I don't think this is a php7.1 effect, maybe before you had set error reporting to a lower level.
 
This is so long ago I don't even remember what I was trying to do :-/ Seems like On Save I'm trying to get the filename of the fileupload element called premfacesall___file.

$image_file = '{premfacesall___file_raw}' . ".png";
$image_path = "images/site/faces/";
$url = JURI::base() . $image_path . $image_file;


$path = "{premfacesall___file_raw}";
$path2 = basename($path) ."<br/>";

$subject = "$path2";
$search = params;
$trimmed = str_replace($search, '', $subject);
$filename = strstr($trimmed, '.png', true);

return $filename;

This was certainly working before (agreed then maybe way before the change to PHP 7.1), not sure why it's now now. Don't know what Parms should be now.
 
Even if it was supposed to be $params, there is no $params in a calc element, so I'm really not sure what you were trying to do.

-- hugh
 
Hey cheesegrits & troester,

I finally found time to take a closer look into what was going on, it's basically looking for the string 'params', so that was an easy fixed.

Thank you for the assistance, I appreciate it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top