Quickfix for CherryFramework4 Invalid argument type – NULL

posted in: PHP, tricks, Wordpress | 0

I’ve been using the Monstroid theme including Motopress and CherryFramework for now 1 year and love it. This is one of the top WordPress theme engine!

But seems to have a bug and I could not find any documentation so I came up with a quick fix. Here is the error message:

 

There is one post on the subject which does not really help..

 

This error seems to occur becaus the name of a shortcode seems to be missing, So let’s add a check when processing shortcodes to see if the neame is here.

 

For fixing it you should go to your WordPress admin dashboard. Going to:

Extensions -> Editor.

Select the “motopress-cherryframework4 Integration” on the right and go to edit the file: “motopress-cherryframework4/motopress-cherryframework4.php

Search for the line:

Just under you should add this line:

 

After adding this line and reloading your website the message:

should disapear.

Maybe they are better way to do this but this worked for me!

 

Here is the full file in case you prefer directly copy-pasting: motopress-cherryframework4/motopress-cherryframework4.php