[wp-trac] [WordPress Trac] #41973: HTTP Error when uploading images on PHP 7.1.9

WordPress Trac noreply at wordpress.org
Mon Sep 25 13:59:31 UTC 2017


#41973: HTTP Error when uploading images on PHP 7.1.9
--------------------------+------------------------------
 Reporter:  robhindle     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.8.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by WraithKenny):

 Might be related to a PHP 7.1 change:
 http://php.net/manual/en/migration71.incompatible.php#migration71.incompatible
 .empty-string-index-operator

 "Applying the empty index operator to a string (e.g. $str[] = $x) throws a
 fatal error instead of converting silently to array."

 In PHP < 7.1, you could have
 {{{#!php
 $variable = ''; // say, from an empty return on `get_post_meta()`
 $variable['key'] = 'anything';
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41973#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list