Fixed [E_USER_WARNING] Accessed unknown getter 'title' on XF:WarningAction[1] in src/XF/Mvc/Entity/Entity.php at line 190

Xon

Well-known member
Affected version
2.1.4
PHP:
ErrorException: [E_USER_WARNING] Accessed unknown getter 'title' on XF:WarningAction[1] in src/XF/Mvc/Entity/Entity.php at line 190
XF::handlePhpError()
trigger_error() in src/XF/Mvc/Entity/Entity.php at line 190
XF\Mvc\Entity\Entity->get() in src/XF/Mvc/Entity/Entity.php at line 101
XF\Mvc\Entity\Entity->__get() in src/XF/Admin/Controller/Warning.php at line 210
XF\Admin\Controller\Warning->actionActionDelete() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 244
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13

The issue is that \XF\Entity\WarningAction does not have a title property/getter;
PHP:
return $plugin->actionDelete(
   $action,
   $this->buildLink('warnings/actions/delete', $action),
   $this->buildLink('warnings/actions/edit', $action),
   $this->buildLink('warnings/actions'),
   $action->title
);
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.5).

Change log:
Create a 'title' getter for the WarningAction entity (`return \XF::phrase('warning_points:') . ' ' . $this->points;`)
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom