User tests: Successful: Unsuccessful:
Pull Request for Issue #18476 .
Function call_user_func()
can not pass arguments by references.
Reference: http://php.net/manual/en/function.call-user-func.php
On php 7.1 and higher this is an issue that generates a PHP Warning.
JError::handleCallback
expected a reference at the first argument.
To fix it, joomla has to use call_user_func_array
, which can pass arguments by reference.
No warning.
PHP Warning: Parameter 1 to PlgSystemLogout::handleError() expected to be a reference, value given in ../libraries/legacy/error/error.php on line 780
PHP Stack trace:
PHP 1. {main}() .../index.php:0
PHP 2. Joomla\CMS\Application\SiteApplication->execute() .../index.php:49
PHP 3. Joomla\CMS\Application\SiteApplication->doExecute() .../libraries/src/Application/CMSApplication.php:267
PHP 4. Joomla\CMS\Application\SiteApplication->dispatch() .../libraries/src/Application/SiteApplication.php:233
PHP 5. Joomla\CMS\Component\ComponentHelper::renderComponent() .../libraries/src/Application/SiteApplication.php:194
PHP 6. Joomla\CMS\Component\ComponentHelper::executeComponent() .../libraries/src/Component/ComponentHelper.php:356
PHP 7. require_once() .../libraries/src/Component/ComponentHelper.php:381
PHP 8. ContentController->execute() .../components/com_content/content.php:43
PHP 9. ContentController->display() .../libraries/src/MVC/Controller/BaseController.php:710
PHP 10. JError::raiseError() .../components/com_content/controller.php:101
PHP 11. JError::raise() .../libraries/legacy/error/error.php:277
PHP 12. JError::throwError() .../libraries/legacy/error/error.php:202
PHP 13. JError::handleCallback() .../libraries/legacy/error/error.php:241
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Title |
|
Something must have changed in core since the original issue was posted as if, indeed, I do not get the PHP Warning anymore (WITH or WITHOUT this patch), I now get a 403 (You are not authorized etc.) instead of a redirection to the page displaying the article.
Maybe you have disabled plugin system logout
It is enabled.
Then it is weird I can reproduce it on php 7.1.13
On linux I do:
sudo phpenmod -v 7.1 xdebug
sudo systemctl restart apache2
You have to install xdebug module for php and restart apache2.
I have tested this item
Tested using PHP 7.2
I have tested this item
Tested with PHP 7.2
Status | Pending | ⇒ | Ready to Commit |
RTC
folks, can you tell me what you get exactly when you edit an article in frontend and logout via the module? Where are you redirected to?
I get redirected to the main page and in the PHP error file Parameter 1 to PlgSystemLogout::handleError()
.
my test was done on a multilingual site. will test again tomorrow
Works fine on a clean install.
Remains to find out here why it does not on ALL my legacy test sites.
I get a 403 for all of them, multilingual or not.
Note: the issue I found with the conjunction of both plugins being enabled has no impact on this PR which does work indeed when the Redirect plugin is disabled.
I confirm 403 when Redirect plugin is enabled.
How to fix it:
Go to backend, plugin list, order by Ordering ascending, then move your plugin "System - Redirect" above "System - Logout".
There are two competing handlers.
joomla-cms/plugins/system/redirect/redirect.php
Lines 50 to 51 in 0155f35
joomla-cms/plugins/system/logout/logout.php
Lines 60 to 61 in 0155f35
I suggest to create a new issue about it.
There are two competing handlers.
I meant: do we have a way through code to force the redirect plugin to load before?
Will create issue anyway.
Plugin "Logout" should override the plugin "Redirect" when there is a cookie "PlgSystemLogout".
If "Logout" is first then there have to be a way to disallow to override Logout redirection by "Redirect" plugin.
I'm not familiar with that code.
@infograf768 as the other PR is merged are you agree to merge here too based on the tests above?
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-13 00:04:05 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
@infograf768 @franz-wohlkoenig @Quy Could any of you test it?