Skip to content

Commit

Permalink
Merge pull request #110 from Mte90/patch-1
Browse files Browse the repository at this point in the history
fix illegal string offset type and name
  • Loading branch information
bordoni committed Jul 6, 2017
2 parents 1c6a272 + d001606 commit 120744b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/post.php
Expand Up @@ -175,7 +175,9 @@ public function parse_request( $qty, $request = array() ) {

if ( $post_id && is_numeric( $post_id ) ) {
foreach ( $metas as $meta_index => $meta ) {
Meta::instance()->object( $post_id )->generate( $meta['type'], $meta['name'], $meta )->save();
if ( isset( $meta['type'] ) && isset( $meta['name'] ) ) {
Meta::instance()->object( $post_id )->generate( $meta['type'], $meta['name'], $meta )->save();
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Expand Up @@ -98,6 +98,7 @@ Thank you for wanting to make FakerPress better for everyone! [We salute you](ht

= 0.4.8 — TBD =

* Fix: Resolve problems on failed Meta generation - Thanks [@Mte90]

= 0.4.7 — 2 of October, 2016 =
* Feature: Image Attachment Meta Field to allow more Flexibility all around the plugin
Expand Down Expand Up @@ -204,4 +205,4 @@ Thank you for wanting to make FakerPress better for everyone! [We salute you](ht
* Fatal Error gerated by a missing file Carbon related fixed

= 0.1.0 — 17 of June, 2014 =
* First initial concept of using [Faker](https://github.com/fzaninotto/Faker) to gerenate data on WordPress
* First initial concept of using [Faker](https://github.com/fzaninotto/Faker) to gerenate data on WordPress

0 comments on commit 120744b

Please sign in to comment.