Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Restore the admin application check for toolbar. #703

merged 1 commit into from

5 participants


This undoes a previous change (#566) which had backward compatibility issues.


Unit testing complete. There were 0 failures and 0 errors from 1971 tests and 11145 assertions.
Checkstyle analysis reported 199 warnings and 0 errors.


I know it was this way before but we can prevent running some code when we write it this way:

if ($app->isAdmin() && $path = JApplicationHelper::getPath('toolbar'))

Let's just put it back the way it was and do a more thorough job of fixing the class later.

@pasamio pasamio merged commit 694c346 into joomla:staging

Hi Elin,
Thanks for the analysis of the bug and the pull request.
Unfortunately, it was breaking the toolbars include and generating a warning.

Here is my pull request for the fix of the fix here:

This also illustrates once more why assignments should not be made inside if statements, like was already the case already before and which prompted for this added bug.

My pull request moves the assignment outside the if, which makes the line cleaner (and passing PHP lint).

My fix is tested.

Commented here too:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 3, 2012
  1. @elinw
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  libraries/joomla/application/component/helper.php
2  libraries/joomla/application/component/helper.php
@@ -357,7 +357,7 @@ public static function renderComponent($option, $params = array())
$contents = self::executeComponent($path);
// Build the component toolbar
- if ($path = JApplicationHelper::getPath('toolbar'))
+ if ($path = JApplicationHelper::getPath('toolbar') && $app->isAdmin())
// Get the task again, in case it has changed
$task = JRequest::getString('task');
Something went wrong with that request. Please try again.