Skip to Content Skip to Menu

[#7532] $this when not in object context on article creation

5 years 7 months ago - 5 years 7 months ago #311842 by independentCog
Debug log.

0 Using $this when not in object context
Call stack
# Function Location
1 () JROOT/plugins/system/cbautoactionsbot/cbautoactionsbot.php(83) : runtime-created function:1
2 __lambda_func() JROOT/libraries/joomla/event/dispatcher.php:165
3 JEventDispatcher->trigger() JROOT/libraries/src/MVC/Model/AdminModel.php:1261
4 Joomla\CMS\MVC\Model\AdminModel->save() JROOT/administrator/components/com_content/models/article.php:676
5 ContentModelArticle->save() JROOT/components/com_content/models/form.php:191
6 ContentModelForm->save() JROOT/libraries/src/MVC/Controller/FormController.php:754
7 Joomla\CMS\MVC\Controller\FormController->save() JROOT/components/com_content/controllers/article.php:355
8 ContentControllerArticle->save() JROOT/libraries/src/MVC/Controller/BaseController.php:710
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_content/content.php:43
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

All of the plugins have been updated to current and this is new recent behavior.
Help on this would be appreciated.
Last edit: 5 years 7 months ago by krileon. Reason: Added [#7532] tag to subject

Please Log in or Create an account to join the conversation.

5 years 7 months ago #311843 by independentCog
Replied by independentCog on topic $this when not in object context on article creation
PHP Version in Cpanel was set to 7.1. Updated to 7.3 and problem was fixed.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48534
  • Thanks: 8290
  • Karma: 1445
5 years 7 months ago #311859 by krileon
That's actually a bug. $this needs to be passed as part of the use usage of the anon function. Have added a bug ticket and fixed for next build.

forge.joomlapolis.com/issues/7532

It only impacts some versions of PHP though as you've noticed after updating to 7.3.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum