Fatal error with CB auto action 6.2.3 nightly release with CB 2.0.9

8 years 10 months ago #265956 by activha
Hi
Just upgraded CB , CB plugins and auto action to 6.2.3 and we get a fatal error when login :
Parse error: syntax error, unexpected end of file in /var/www/html/components/com_comprofiler/plugin/user/plug_cbautoactions/models/code.php(47) : runtime-created function on line 111

Fatal error: Function name must be a string in /var/www/html/components/com_comprofiler/plugin/user/plug_cbautoactions/models/code.php on line 48

There are no changes on the website, only upgrades on CB.
Code auto action did not change for two last months and were working great.

Any idea ?

Please Log in to join the conversation.

8 years 10 months ago - 8 years 10 months ago #265957 by activha
I have also noticed that upgrading auto action to 6.2.3 defaults all php code to html !!
Thus I had to reconnect all code actions, please tell us when such important modifications are made.

Even after these corrections, we still have the fatal errors listed above when trying to log in.

Further investigations :
The two following lines seem to break the CB code and gives fatal error :
// break to test
//break;

Removing those lines solved the problem.
This is fine but can you tell me why it happens on this newest version and not on the previous ones ?

Thanks

Please Log in to join the conversation.

8 years 10 months ago #265980 by krileon
The eval code method was removed. All existing code methods using it will change to create_function usage. A re-save isn't needed, but your code may need to be fixed depending on what you were doing. Eval was modifying variables outside its scope as it's inline execution. This was causing things like $this, $trigger, $user, etc.. to be modified and broke CB Auto Actions as it was modifying those variables of the action not just of your own code. This isn't an issue with create_function.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn