Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37502 closed defect (bug) (fixed)

Undefined index in function wp_dependencies_unique_hosts()

Reported by: stillatmylinux's profile stillatmylinux Owned by: ocean90's profile ocean90
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: has-patch has-unit-tests commit dev-reviewed
Focuses: template Cc:


When I use wp_deregister_script( 'select2' ); in a plugin, I receive the following PHP notices:

Notice: Undefined index: select2 in /Users/matt/projects/appp/www/wp-includes/general-template.php on line 2878

Notice: Trying to get property of non-object in /Users/matt/projects/appp/www/wp-includes/general-template.php on line 2879

Attachments (1)

37502.patch (1.4 KB) - added by ocean90 8 years ago.

Download all attachments as: .zip

Change History (12)

#1 @ocean90
8 years ago

  • Keywords reporter-feedback added

Hello @stillatmylinux, welcome to our Trac!

Thanks for your report. Core doesn't bundle Select2 by default. Which theme and plugins are using?

#2 @stillatmylinux
8 years ago

woocommerce and our paid extension AppWoo.

#3 @SergeyBiryukov
8 years ago

Appears to be introduced in [38100].

Could you provide the exact code you're using? Sounds like it might run too early.

8 years ago

#4 @ocean90
8 years ago

  • Keywords has-patch has-unit-tests added; reporter-feedback removed
  • Milestone changed from Awaiting Review to 4.6

Thanks @stillatmylinux, 37502.patch should fix this issue.

#5 @stillatmylinux
8 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Yep, that fixed it.

#6 @DrewAPicture
8 years ago

  • Milestone 4.6 deleted

#7 @ocean90
8 years ago

  • Keywords commit added
  • Milestone set to 4.6
  • Resolution worksforme deleted
  • Status changed from closed to reopened

@stillatmylinux Thanks for the feedback. To get it really fixed we have to commit it first. :-)

#8 @SergeyBiryukov
8 years ago

37502.patch looks good to me.

#9 @ocean90
8 years ago

  • Keywords dev-reviewed added

#10 @voldemortensen
8 years ago

I'm not a committer or anything, but it looks good to me too.

#11 @ocean90
8 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from reopened to closed

In 38174:

Script Loader: Ignore deregistered dependencies in wp_dependencies_unique_hosts().

Prevents a PHP warning when a handle of a deregistered dependency is still in the queue.

Fixes #37502.

Note: See TracTickets for help on using tickets.