Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#42525 closed defect (bug) (fixed)

PHP notice spawns on admin welcome panel if a user haven't 'customize' capability

Reported by: saddeveloper's profile SadDeveloper Owned by: westonruter's profile westonruter
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.9
Component: Administration Keywords: has-patch commit dev-reviewed
Focuses: administration Cc:

Description (last modified by ocean90)

Notice: Undefined variable: customize_themes_link in wp-admin/includes/dashboard.php on line 1577 spawns if a user have the capability to edit_theme_options but not to customize. Seems that bug is introduced in [41699].

Attachments (4)

42525.patch (993 bytes) - added by skostadinov 7 years ago.
Okay, i moved the var & now it's working for me.
42525.2.patch (1.6 KB) - added by skostadinov 7 years ago.
I modified the var again. If the user can 'install_themes' create the var & show the info text.
42525.3.diff (1.5 KB) - added by westonruter 7 years ago.
Break up PHP PI for additional clarity
42525.4.diff (1.7 KB) - added by ocean90 7 years ago.

Download all attachments as: .zip

Change History (13)

#1 @johnbillion
7 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.9
  • Owner set to westonruter
  • Status changed from new to assigned

Thanks for the report!

@westonruter Wanna grab this one?

@skostadinov
7 years ago

Okay, i moved the var & now it's working for me.

@skostadinov
7 years ago

I modified the var again. If the user can 'install_themes' create the var & show the info text.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


7 years ago

#3 @westonruter
7 years ago

  • Keywords has-patch added; needs-patch removed
  • Status changed from assigned to accepted

@westonruter
7 years ago

Break up PHP PI for additional clarity

#4 @westonruter
7 years ago

  • Keywords commit dev-feedback added

Bug was introduced in [41699] for #42050.

#5 @ocean90
7 years ago

  • Description modified (diff)

@ocean90
7 years ago

#6 @ocean90
7 years ago

@westonruter 42525.3.diff would still link to customize.php even if the user can't customize. 42525.4.diff falls back to admin_url( 'themes.php' ).

Last edited 7 years ago by westonruter (previous) (diff)

#7 @westonruter
7 years ago

  • Keywords dev-reviewed added; dev-feedback removed

#8 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 42169:

Customize: Prevent PHP notice on theme-switch dashboard welcome link (and link to themes admin screen) when user cannot customize.

Props skostadinov, ocean90.
Amends [41699].
See #42050.
Fixes #42525.

#9 @westonruter
7 years ago

In 42170:

Customize: Prevent PHP notice on theme-switch dashboard welcome link (and link to themes admin screen) when user cannot customize.

Props skostadinov, ocean90.
Amends [41699].
See #42050.
Fixes #42525 for 4.9.

Note: See TracTickets for help on using tickets.