- fixed PHP notices/warnings;

This commit is contained in:
nikitasinelnikov
2020-12-16 14:46:38 +02:00
parent 41350e1391
commit ba291a6bfe
3 changed files with 13 additions and 4 deletions
+2 -1
View File
@@ -40,6 +40,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
function __construct() {
$this->in_edit = false;
$this->edit_mode_value = null;
$this->edit_array = [];
add_action( 'admin_head', array( &$this, 'admin_head' ), 9);
add_action( 'admin_footer', array( &$this, 'load_modal_content' ), 9);
@@ -1233,7 +1234,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
if ( $this->in_edit == true ) { // we're editing a field
$real_attr = substr( $attribute, 1 );
$this->edit_mode_value = (isset( $this->edit_array[ $real_attr ] ) ) ? $this->edit_array[ $real_attr ] : null;
$this->edit_mode_value = isset( $this->edit_array[ $real_attr ] ) ? $this->edit_array[ $real_attr ] : null;
}
switch ( $attribute ) {