Skip to content
Permalink
Browse files

- Fixed Call to undefined method WP_Error::get_items() in the Add-ons…

… page when fetching feeds failed.
  • Loading branch information...
michaeluno committed May 28, 2019
1 parent ee5fa8a commit 5b6835d85a085ade666fd62c9f6e29ed32f609fc
@@ -6,7 +6,7 @@
* Author: Michael Uno
* Author URI: http://en.michaeluno.jp/
* Requirements: PHP 5.2.4 or above, WordPress 3.3 or above.
* Version: 3.8.19
* Version: 3.8.20b01
*/
/**
@@ -16,7 +16,7 @@
*/
class AdminPageFrameworkLoader_Registry_Base {
const VERSION = '3.8.19'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const VERSION = '3.8.20b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing.
const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc.
const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.';
@@ -35,11 +35,11 @@
* @download_latest https://github.com/michaeluno/admin-page-framework/archive/master.zip
* @download_stable http://downloads.wordpress.org/plugin/admin-page-framework.latest-stable.zip
* @catchcopy The framework for all WordPress developers.
* @version 3.8.19
* @version 3.8.20b01
*/
abstract class AdminPageFramework_Registry_Base {
const VERSION = '3.8.19'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const VERSION = '3.8.20b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const NAME = 'Admin Page Framework';
const DESCRIPTION = 'Facilitates WordPress plugin and theme development.';
const URI = 'http://en.michaeluno.jp/admin-page-framework';
@@ -57,6 +57,9 @@ public function get( $iItems=0 ) {
}
$_oFeed = fetch_feed( $_aURLs );
if ( is_wp_error( $_oFeed ) ) {
return $_aOutput;
}
foreach ( $_oFeed->get_items() as $_oItem ) {
$_aOutput[ $_oItem->get_title() ] = array(
'content' => $_oItem->get_content(),
@@ -539,6 +539,9 @@ See examples, https://gist.github.com/michaeluno/c30713fcfe0d9d45d89f, https://g

== Changelog ==

= 3.8.20 =
- Fixed the PHP error `Call to undefined method WP_Error::get_items()` in the Add-ons page when fetching feeds failed.

= 3.8.19 - 2019/02/24 =
- Added checks to prevent unnecessary calls on `setUp()` in `admin-ajax.php`.
- Tweaked styling of the welcome page in the admin area of the loader plugin for WordPress 5.0.

0 comments on commit 5b6835d

Please sign in to comment.
You can’t perform that action at this time.