Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Warning: Parameter 1 to JError::customErrorPage() PHP7.0.9 #11360

Merged
merged 4 commits into from Jul 30, 2016

Conversation

Projects
None yet
8 participants
@810
Copy link
Contributor

commented Jul 29, 2016

On the new PHP 7.0.9 version you will getting some warnings like:

Warning: Parameter 1 to JError::customErrorPage() expected to be a reference, value given in C:\wamp\www\develop\libraries\legacy\error\error.php on line 781

test instructions:

Set environment to PHP 7.0.9
Use a component that using custom error pages like kunena.

Add a extra letter on the url on the category name.

Before fix:
above warning message
After fix:
Showed the custom error page

Jelle Kok
@810

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2016

On hold, if php is reverting the change.

https://bugs.php.net/bug.php?id=72698

@mbabker

This comment has been minimized.

Copy link
Member

commented Jul 30, 2016

It's still going to have to be addressed. From the looks of that bug
report the change was reverted in PHP 7.0 but will exist in 7.1.

On Friday, July 29, 2016, Jelle Kok notifications@github.com wrote:

On hold, if php is reverting the change.

https://bugs.php.net/bug.php?id=72698


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11360 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfoSRXuKnpPSiS4I7jqRL4MEE8Dgilks5qaoydgaJpZM4JYoSg
.

@810

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2016

other warning is:

PHP Warning: Parameter 1 to PlgSystemRedirect::handleError() expected to be a reference, value given in /home/user/public_html/libraries/legacy/error/error.php on line 781

but i haven't able this fix this warning

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

I have tested this item successfully on fdbe1ab

Before this PR a random url such as utu9ur0t9 will give the reported error
After this PR it is all good

You dont need kunena to test


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11360.

@zero-24

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

@810

PHP Warning: Parameter 1 to PlgSystemRedirect::handleError() expected to be a reference, value given in /home/user/public_html/libraries/legacy/error/error.php on line 781

maybe remove the & here too?

https://github.com/joomla/joomla-cms/blob/staging/plugins/system/redirect/redirect.php#L65

@n9iels

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

I have tested this item successfully on fdbe1ab

Before the patch got a 0 - Call to a member function get() on null error when trying to access a not existing article. After the patch I get a 404 error like expected


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11360.

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2016

Rtc


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11360.

@joomla-cms-bot joomla-cms-bot added the RTC label Jul 30, 2016

@brianteeman brianteeman added this to the Joomla 3.6.1 milestone Jul 30, 2016

Jelle Kok
@810

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2016

@zero-24 yes thats worked, thnx updated this pr, with that fix also

Jelle Kok
@@ -62,7 +62,7 @@ public function __construct(&$subject, $config)
*
* @since 1.6
*/
public static function handleError(JException &$error)
public static function handleError(JException $error)

This comment has been minimized.

Copy link
@n9iels

n9iels Jul 30, 2016

Contributor

Please change also the doc comment :)

edit: to fast, didn't say anything :P

This comment has been minimized.

Copy link
@810

810 Jul 30, 2016

Author Contributor

already fixed ;)

@wilsonge wilsonge merged commit 2fa9e9b into joomla:staging Jul 30, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joomla-cms-bot joomla-cms-bot removed the RTC label Jul 30, 2016

@PhilETaylor

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

I have tested this item successfully on 1cbc40f

Tested on PHP 7.0.9


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11360.

@brianteeman

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

It was merged @PhilETaylor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.