Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37681 closed defect (bug) (fixed)

Remove `function_exists( 'ini_get' )` from `_load_image_to_edit_path()`

Reported by: dd32's profile dd32 Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.7 Priority: normal
Severity: trivial Version:
Component: General Keywords: has-patch commit
Focuses: Cc:


Introduced with [20806] is a check for function_exists( 'ini_get' ) we don't check the ability to call ini_get() anywhere else in core, so removing this from the check increases the consistency in core.

Attachments (1)

37681.diff (1.6 KB) - added by dd32 8 years ago.

Download all attachments as: .zip

Change History (3)

8 years ago

#1 @dd32
8 years ago

If anyone is curious as to when this code is hit..

It appears to be hit if you're editing an image which was uploaded pre-2.7 and/or if the file metadata has gone missing. In that case, the image editors will treat the image URL as the source image through the filesystem wrappers, bypassing wp_remote_get(), which is why the fopen and allow_url_fopen are there.

#2 @wonderboymusic
8 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 38333:

Media: remove function_exists() call for ini_get() in _load_image_to_edit_path().

Props dd32.
Fixes #37681.

Note: See TracTickets for help on using tickets.