Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#35812 closed defect (bug) (wontfix)

Errors in class.wp-dependencies.php

Reported by: sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Script Loader Keywords: has-patch reporter-feedback
Focuses: Cc:


On client WebSite in debug.log I can see errors:

[12-Feb-2016 13:59:30 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /wp-includes/class.wp-dependencies.php on line 342
[12-Feb-2016 13:59:30 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class.wp-dependencies.php on line 337

I think that should be if with condition:

if ( is_array( $queue ) && ! empty( $queue ) ) {


Attachments (2)

35812.patch (1.2 KB) - added by sebastian.pisula 6 years ago.
35762.patch (1.2 KB) - added by sebastian.pisula 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 @sebastian.pisula
6 years ago

  • Keywords has-patch added

#2 @johnbillion
6 years ago

  • Keywords reporter-feedback added

Thanks for the report @sebastian.pisula.

Can you provide some steps to reproduce this error please?

#3 @johnbillion
6 years ago

  • Component changed from General to Script Loader

#4 @sebastian.pisula
6 years ago

I can't because I got the information from the client about this errors. I fixed this bug only. I don't know what he install or change. But I think that before foreach should be if with is_array and empty

Second problem - in wp-config.php user had define('WP_DEBUG', 'false'); and in screen I saw errors. I set:

define('WP_DEBUG', 1);
define('WP_DEBUG_LOG', 1);
define('WP_DEBUG_DISPLAY', 0);

and errors was hidden.

#5 @ocean90
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This looks more like a developer error since dependencies should always be an array.

Note: See TracTickets for help on using tickets.