Child of #2454439: [META] Support PHP 7

Another important change in PHP 7 is with catchable fatal errors. Previously, these would have been caught and handled using set_error_handler(). However, with PHP 7, they are now \Error exceptions, which, because an uncaught exception is now a real fatal error, will no-longer be catchable in set_error_handler().

This is a backwards compatibility break and means that to work in both PHP 5.x and 7, you need to use both set_error_handler() and try... catch.

From http://daveyshafik.com/archives/tag/php-7

Therefore the test is broken because it adds a custom error handler to settings.php.

CommentFileSizeAuthor
#5 2599446-5.patch3.56 KBalexpott
#2 2599446-2.patch8.92 KBalexpott

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
Issue tags: -Needs backport to D7, -Needs issue summary update, -D8 Accelerate Dev Days, -rc target
StatusFileSize
new8.92 KB
alexpott’s picture

I've tested this on PHP7 and PHP5.6

chx’s picture

I do not know what I am reading but I do not think this is the patch you wanted to post. active config?

alexpott’s picture

StatusFileSize
new3.56 KB

alexpott-- light issues with making the patch.

Fixed them.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me, and confirmed that failure no longer appears on the patch result.

effulgentsia’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to 8.0.x.

  • effulgentsia committed 32a9e1c on 8.0.x
    Issue #2599446 by alexpott: UncaughtExceptionTest fails on PHP7
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.