Missing JError at JApplication

32 views
Skip to first unread message

Saulo Soares de Toledo

unread,
May 5, 2012, 10:28:39 AM5/5/12
to joomla-de...@googlegroups.com
Lasts days I decided try use JApplication to personal applications development. In my first try I think I found a situation where we could add a Exception to JApplication code, and I want confirm here.

At JApplication.php, line 199 we have:

$info = JApplicationHelper::getClientInfo($client, true);

At JApplicationHelper::getClientInfo(), there is a situation where If no client id has been passed, the code returns an array.

Back to JApplication.php, at line 201, we have:

$path = $info->path . '/includes/application.php';

But if $info is an array, there is a PHP warning. This should not happen.

At line 200 we should have something like:
if (is_array($info))
{
return JError::raiseError(500, JText::sprintf('JLIB_APPLICATION_ERROR_APPLICATION_NOCLIENT', $client));
}

A JPlatform developer here can check the issue?


Saulo Soares de Toledo

unread,
May 5, 2012, 10:44:17 AM5/5/12
to joomla-de...@googlegroups.com
correcting: a notice (Trying to get property of non-object), not a warning. 

2012/5/5 Saulo Soares de Toledo <saulo...@gmail.com>
Reply all
Reply to author
Forward
0 new messages