[wp-trac] [WordPress Trac] #27365: Upgrader bulk_upgrade() functions do not return the correct data

WordPress Trac noreply at wordpress.org
Tue Mar 11 23:02:54 UTC 2014


#27365: Upgrader bulk_upgrade() functions do not return the correct data
-----------------------------+--------------------
 Reporter:  chrisbliss18     |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  3.9
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+--------------------
Changes (by chrisbliss18):

 * keywords:  has-patch needs-testing => has-patch


Comment:

 johnbillion suggested that I provide details about what the
 `$this->result` variable is.

 Digging through the code, it is set (as far as upgrading is concerned) by
 the `WP_Upgrader::install_package()` function. After the
 `install_package()` function runs, the `$this->result` variable contains
 the value returned by the function. Since this value is ultimately
 returned by the `WP_Upgrader::run()` function, it would seem that this
 result would be seen in successful upgrade responses. In my testing, I
 would see null responses even on successful upgrades, so I'm not sure what
 accounts for that issue.

 Even if the proper response was contained in `$this->result`, using it in
 this spot is still a poor decision as it would only contain the response
 from the `WP_Upgrader::install_package()` function and not the error
 responses that `WP_Upgrader::run()` returns before calling
 `WP_Upgrader::install_package()`.

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


More information about the wp-trac mailing list