With a View that has an exposed click sort on date, it'll cause a fatal error when the data column is clicked when using PHP 7.1+. This is actually already fixed upstream in this issue:

#2449261: expects an array, not a scalar - Fatal error: Cannot create references to/from string offsets

However, this isn't included in the latest stable release of Date. So, I propose we add this patch until it is released!

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new505 bytes

Patch is attached!

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/643003982

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

This works - tested on a view with an exposed date filter and click-sortable table display.

dsnopek’s picture

Here's another bunch of PHP 7 issues that were already committed:

https://www.drupal.org/node/2889759

https://www.drupal.org/node/2995679

https://www.drupal.org/node/2843367

I guess we should look at those too, but I don't think those are fatal errors, so waiting for the release may be OK, if any are problematic somehow

dsnopek’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new959 bytes

Here's a new patch that adds all the PHP 7 patches.

I read them, and they look good. I tested that the patches all apply and that the result still works in a rudimentary way (I added a Date field to a content type and created a node with it). This all seems fine.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

We've been using these Date patches in a Panopoly child distribution and everything's working fine.

  • dsnopek committed 2f62b70 on 7.x-1.x
    Issue #3109597 by dsnopek, cboyden: Fix fatal error in Date with PHP 7.1...
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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