diff --git a/core/gallery/class-mpp-gallery.php b/core/gallery/class-mpp-gallery.php index 3a03c36..f26684d 100644 --- a/core/gallery/class-mpp-gallery.php +++ b/core/gallery/class-mpp-gallery.php @@ -239,7 +239,7 @@ private function map_object( $_gallery ){ foreach ( get_object_vars( $_gallery ) as $key => $value ) { if ( isset( $field_map[ $key ] ) ) - $this->$field_map[ $key ] = $value; + $this->{$field_map[ $key ]} = $value; } //there is no harm in doing this diff --git a/core/media/class-mpp-media.php b/core/media/class-mpp-media.php index 8713be3..bb85d4a 100644 --- a/core/media/class-mpp-media.php +++ b/core/media/class-mpp-media.php @@ -285,7 +285,7 @@ public function map_object( $media ){ foreach ( get_object_vars( $media ) as $key => $value ) { if ( isset( $field_map[ $key ] ) ) - $this->$field_map[ $key ] = $value; + $this->{$field_map[ $key ]} = $value; }