[wp-trac] [WordPress Trac] #9757: Allow Plugin/Theme updates from a uploaded .zip file.

WordPress Trac noreply at wordpress.org
Sun Jul 12 22:14:07 UTC 2020

#9757: Allow Plugin/Theme updates from a uploaded .zip file.
 Reporter:  hakre                                |       Owner:  azaozz
     Type:  feature request                      |      Status:  closed
 Priority:  high                                 |   Milestone:  5.5
Component:  Upgrade/Install                      |     Version:  2.8
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  dev-feedback has-patch early needs-  |     Focuses:  ui, ui-
  dev-note commit                                |  copy

Comment (by SergeyBiryukov):

 Replying to [comment:175 afragen]:
 > Both of the compatibility functions include a test for the parameter as
 empty. It should be sufficient to simply use the compatibility function in
 the conditional.

 They do, but omitting the check would cause a notice if the plugin data
 doesn't have the `RequiresPHP` key:
 $new_plugin_data = array();
 var_dump( is_php_version_compatible( $new_plugin_data['RequiresPHP'] ) );

 Notice: Undefined index: RequiresPHP

 It might be that the key always exists at that point, but that doesn't
 seem to be the case at a glance, so I think including the `! empty()`
 check is a safer option.

Ticket URL: <https://core.trac.wordpress.org/ticket/9757#comment:176>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list