• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

php7.4 deprecated array_key_exists()

Kordian

Member
Hi,
After upgrading php to 7.4 this is the only error, present in numerous fabrikar files.

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /components/com_fabrik/models/list.php on line 1267

Can we expect the corrected version soon?
Thanks in advance!
 
Yup, I'll be gradually fixing those as I run across them. But for now at least, 7.3 is the recommended PHP version to use.

-- hugh
 
Hi
For your information, I've the same error after upgrading PHP to 7.4 : "Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/luckavrt/public_html/libraries/fabrik/fabrik/Helpers/StringHelper.php
I must activate the debug mode to show the error, otherwise I have a blank page

For now, I continue to use PHP 7.3
Daniel
 
Last edited:
You don't mention the line but I think this one was already fixed in GitHub.
Running php 7.3 you should use the GitHub version anyway.
 
Hi,

On a empty list data view with PHP 7.4:
a lot of errors Deprecated: array_key_exists():
on components/com_fabrik/models/list.php
and components/com_fabrik/models/element.php on line 997

I will try to solve by myself, if I can. ;)
 
Last edited:
My harvest
Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in
/httpdocs/components/com_fabrik/models/element.php on line 997
/httpdocs/components/com_fabrik/models/element.php on line 1072
/httpdocs/components/com_fabrik/models/element.php on line 1152
/httpdocs/components/com_fabrik/models/form.php on line 357
/httpdocs/components/com_fabrik/models/group.php on line 954
/httpdocs/components/com_fabrik/models/list.php on line 4306
/httpdocs/components/com_fabrik/models/list.php on line 4401
/httpdocs/components/com_fabrik/models/list.php on line 1065
/httpdocs/components/com_fabrik/models/list.php on line 10767
/httpdocs/components/com_fabrik/models/list.php on line 1244
/httpdocs/components/com_fabrik/models/list.php on line 1283
/httpdocs/components/com_fabrik/models/list.php on line 1468
/httpdocs/components/com_fabrik/models/list.php on line 3618
/httpdocs/components/com_fabrik/models/list.php on line 3619
/httpdocs/components/com_fabrik/models/list.php on line 4130
/httpdocs/components/com_fabrik/models/list.php on line 4247
/httpdocs/components/com_fabrik/models/list.php on line 4449
/httpdocs/components/com_fabrik/models/list.php on line 4465
/httpdocs/components/com_fabrik/models/list.php on line 4481
/httpdocs/components/com_fabrik/models/list.php on line 4497
/httpdocs/components/com_fabrik/models/list.php on line 4497
/httpdocs/components/com_fabrik/models/list.php on line 4537
/httpdocs/components/com_fabrik/models/list.php on line 4593
/httpdocs/components/com_fabrik/models/list.php on line 6665
/httpdocs/components/com_fabrik/models/plugin.php on line 696

Mind that, of course, we have
Code:
property_exists ( mixed $class , string $property )
which parameters are in the reverse order as in
Code:
array_key_exists ( mixed $key , array $array )

Also, there is a problem in
group.php
Code:
// if (array_key_exists($startPage, $pages) && is_array($pages[$startPage])
if (property_exists($pages, $startPage) && is_array($pages[$startPage])
raises a blank page with
0 Cannot use object of type stdClass as array

Expecting a solution, I just commented the block.

PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in
/httpdocs/components/com_fabrik/models/form.php on line 2321
/httpdocs/components/com_fabrik/models/list.php on line 7776

PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in
/httpdocs/components/com_fabrik/models/list.php on line 3618
/httpdocs/components/com_fabrik/models/list.php on line 3619
 
Last edited:
Thanks for reporting.
PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in
/httpdocs/components/com_fabrik/models/form.php on line 2321
/httpdocs/components/com_fabrik/models/list.php on line 7776
Fixed in GitHub
Also, there is a problem in group.php
Code (Text):
// if (array_key_exists($startPage, $pages) && is_array($pages[$startPage])
if (property_exists($pages, $startPage) && is_array($pages[$startPage])
I can't see this in Fabrik3.9.2 or the recent GitHub ($pages IS an array, no object)
PHP Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in
/httpdocs/components/com_fabrik/models/list.php on line 3618
/httpdocs/components/com_fabrik/models/list.php on line 3619
Was already fixed in GitHub
 
Hi,
I don't know if I have to open a new thread, but I found a similar error in my Fabrik installation (3.9.2) with php 7.4, even after Github update.
The error I have to report is:

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /httpdocs/components/com_fabrik/models/list.php on line 4494

Thank you
 
When did you update from Github? There were several related fixes made yesterday by Hugh.
 
Ok, then you'll just have to wait until the rest of the warnings are getting fixed. Or maybe @troester can help :)
 
Last edited:
For PHP 7.4 these are warnings, not errors. I still get these after the latest fixes, so there are still some todo.
To use PHP 7.4 you can change the error reporting in the J! global setting to 'System default' or 'None'. At least that's how it works for me.
For PHP 8 these are errors and fabrik will not run.
 
Hi henk,
I had error reporting set to "Development" and switching to php 7.4. the form I created with fabrik used to stop working.
I tried to change error reporting on "None" as you suggest and now everything seems to work.
Thank you!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top