JezK
Edit File: Plugin.php
<?php defined('AUTOUPDATER_LIB') or die; require_once __DIR__ . '/Compatibility.php'; class AutoUpdater_Upgrader_Skin_Plugin extends AutoUpdater_Upgrader_Skin_Plugin_Compatibility { /** * @var bool * @since 4.0 WordPress */ public $done_footer = false; protected $errors = array(); protected $feedback = array(); public function header() { if ($this->done_header) { return; } $this->done_header = true; } public function footer() { if ($this->done_footer) { return; } $this->done_footer = true; } /** * Store errors instead of sending them to the feedback method * * @param string|WP_Error $errors */ public function error($errors) { if (is_string($errors)) { $this->errors[$errors] = $message = $errors; } elseif (is_wp_error($errors)) { /** @var WP_Error $errors */ $error_data = $errors->get_error_data(); $message = 'Error code: ' . $errors->get_error_code() . ', message: ' . $errors->get_error_message() . (is_scalar($error_data) ? ', data: ' . $error_data : ''); $this->errors[$errors->get_error_code()] = $errors->get_error_message() . (is_scalar($error_data) ? ' ' . $error_data : ''); } else { $error = var_export($errors, true); $message = 'Unknown error, dump: ' . $error; $this->errors['unknown_error'] = $error; } AutoUpdater_Log::debug($message); } /** * Get all stored errors * * @return array */ public function get_errors() { return $this->errors; } /** * @return array */ public function get_feedback() { return $this->feedback; } public function before() { // noop to implement the interface } public function after() { // noop to implement the interface } public function bulk_header() { // noop to implement the interface } public function bulk_footer() { // noop to implement the interface } }