fixed index not found error in read()
This commit is contained in:
parent
3528ac6f24
commit
b477184692
@ -19,8 +19,13 @@ class Meta extends Model
|
|||||||
|
|
||||||
function read( $key ){
|
function read( $key ){
|
||||||
$meta = unserialize( $this->meta );
|
$meta = unserialize( $this->meta );
|
||||||
|
if ( array_key_exists( $key, $meta ) ){
|
||||||
return $meta[ $key ];
|
return $meta[ $key ];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function write( $key, $value ){
|
function write( $key, $value ){
|
||||||
$meta = unserialize( $this->meta );
|
$meta = unserialize( $this->meta );
|
||||||
|
Loading…
Reference in New Issue
Block a user