Problem/Motivation

Deprecated: Required parameter $node follows optional parameter $edit in /var/www/docroot/sites/all/modules/nodequeue/includes/nodequeue.actions.inc on line 79

and

Deprecated: Required parameter $node follows optional parameter $edit in /var/www/docroot/sites/all/modules/nodequeue/includes/nodequeue.actions.inc on line 211

and

Warning: Attempt to read property "relationship" on null in nodequeue_contextual_links_view_alter() (line 509 of /var/www/docroot/sites/all/modules/nodequeue/nodequeue.module).

and

Warning: Trying to access array offset on value of type null in nodequeue_contextual_links_view_alter() (line 509 of /var/www/docroot/sites/all/modules/nodequeue/nodequeue.module).

and

Warning: Undefined property: view::$display_handler in nodequeue_contextual_links_view_alter() (line 509 of /var/www/docroot/sites/all/modules/nodequeue/nodequeue.module).

Steps to reproduce

Upgrade to PHP 8

Issue fork nodequeue-3279537

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loopy1492 created an issue. See original summary.

loopy1492’s picture

Issue summary: View changes
loopy1492’s picture

Title: PHP 8 regression: Deprecated: Required parameter $node follows optional parameter $edit » PHP 8 regressions
Issue summary: View changes

jenlampton’s picture

Status: Active » Needs review

Is it safe to switch from an $edit array to a $node object in those actions? Marking as Needs Review for more testing.

Natallia’s picture

StatusFileSize
new919 bytes

According to my investigation the optional parameter $edit in nodequeue.actions.inc (lines 79, 211) works the same as required parameter (tested on PHP 5.3, 7.3) so I suggest to just remove the default value.

Natallia’s picture

StatusFileSize
new1 KB

The patch from #6 comment heeds to be updated - default values should be added for optional parameters

nick dewitte’s picture

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

The previous patch seems to be working as intended.
The file paths don't seem to be correct, however.

Patch attached does the same thing as #7, but has corrected paths.

  • jenlampton committed fdac522 on 7.x-2.x
    Issue #3279537 by loopy1492: Fix PHP 8 regressions.
    
jenlampton’s picture

Status: Reviewed & tested by the community » Fixed

All changes merged.

Status: Fixed » Closed (fixed)

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