Install Kunena
go to forum
Running the component
Call to a member function get() on string
J3.x
Php 7.0.6
PHP <= 7.0.5 Working normal
The code is running the JRegistry params
plugins\kunena\joomla\access.php line 260
Is this a PHP Bug, or Joomla bug, or our bug.
maybe this is the issue: https://bugs.php.net/bug.php?id=72117
@mbabker any idea?
C:\Program Files (x86)\Zend\ZendServer\data\apps\http__default__\0\kunena\3.5.0_3\plugins\kunena\joomla\access.php:260
is this code:
public function getAuthoriseActions(KunenaForumCategory $category, $userid)
{
$groups = (array) JAccess::getGroupsByUser($userid, true);
$post = array_intersect($groups, (array) $category->params->get('access_post', array(2, 6, 8)));
$reply = array_intersect($groups, (array) $category->params->get('access_reply', array(2, 6, 8)));
return array('topic.create' => !empty($post), 'topic.reply' => !empty($reply), 'topic.post.reply' => !empty($reply));
}
and that's loaded this file:
C:\Program Files (x86)\Zend\ZendServer\data\apps\http__default__\0\kunena\3.5.0_3\libraries\kunena\forum\category\category.php
To me the error looks like that $category->params is a string, not Registry object. Not sure if it is related to the above change in PHP or not.
Closing as its not joomla core
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-12 08:47:47 |
Closed_By | ⇒ | brianteeman |
We have fixed the issue by:
Before
$instances = (array) $db->loadObjectList('id', 'KunenaForumCategory');
After fix:
$instances = (array) $db->loadObjectList('id', 'KunenaForumCategory');
foreach ($instances as &$instance)
{
$instance = new KunenaForumCategory(array('id'=>$instance->id));
$instance->load();
}
Labels |
Added:
?
|
Can't tell. Your issue report references Kunena scripts. If you give something using only core it might be easier to trace but as is there are too many variables to try and debug this. Also Registry doesn't have
__get()
or__isset()
methods so if it is that same PHP bug it's an odd mutation to say the least.