Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37681 closed defect (bug) (fixed)

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

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

Description

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 10 years ago.

Download all attachments as: .zip

Change History (3)

#1 @dd32
10 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
10 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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.