Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent fatal error with newer PHP versions #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin-bar-color.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Admin Bar Color
Plugin URI: http://github.com/eduardozulian/admin-bar-color
Description: Use your favorite Dashboard color scheme on the front end admin bar.
Version: 1.2
Version: 1.2.0.1
Author: Eduardo Zulian
Author URI: http://zulian.org
License: GNU General Public License v2 or later
Expand All @@ -28,7 +28,7 @@ function __construct() {
function save_wp_admin_color_schemes_list() {
global $_wp_admin_css_colors;

if ( count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) {
if ( !empty( $_wp_admin_css_colors ) && count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) {
update_option( 'wp_admin_color_schemes', $_wp_admin_css_colors );
}
}
Expand Down