You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally: Fatal error: Declaration of HMCI\Inserter\WP\Guest_Author::insert($user_data = Array, $canonical_id = false, $author_meta = Array) must be compatible with HMCI\Inserter\WP\Post::insert($post_data = Array, $canonical_id = false, $post_meta = Array, $options = Array) in /vagrant/content/client-mu-plugins/hm-content-import/inc/classes/inserter/wp/guest-author.php on line 0 Fatal error: Declaration of HMCI\Inserter\WP\Attachment::exists($canonical_id) must be compatible with HMCI\Inserter\WP\Post::exists($canonical_id, $post_type = 'post') in /vagrant/content/client-mu-plugins/hm-content-import/inc/classes/inserter/wp/attachment.php on line 0
The text was updated successfully, but these errors were encountered:
Hmm, that's a bit annoying. Bit of a clash with established design patterns and the use case we have here.
If we wanted to hack this in the "WordPress" way, we'd go for a generic $args array as an optional:
function insert( $object_data, $canonical_id, $meta, $args = [] );
Where we can support args which don't fit into the standard structure. Bit messy in my opinion, doesn't lead to good hinting, but may well be the best option.
Another more "correct" option might be something like:
@mikeselander if this is blocking you, happy to take a PR to transfer additional args for inserters into generic $args array, should be able to normalise everything quite easily with that approach.
On Chassis with PHP7.2, I get the following fatal error when attempting to load WP:
It looks like the signatures of each of the extended types are different and we can no longer get away with this.
Fatal error: Declaration of HMCI\Inserter\WP\Attachment::insert($path, $post_data = Array, $canonical_id = false, $post_meta = Array, $file_type_override = NULL, $force_update_existing = true) must be compatible with HMCI\Inserter\WP\Post::insert($post_data = Array, $canonical_id = false, $post_meta = Array) in /vagrant/content/client-mu-plugins/hm-content-import/inc/classes/inserter/wp/attachment.php on line 0
Additionally:
Fatal error: Declaration of HMCI\Inserter\WP\Guest_Author::insert($user_data = Array, $canonical_id = false, $author_meta = Array) must be compatible with HMCI\Inserter\WP\Post::insert($post_data = Array, $canonical_id = false, $post_meta = Array, $options = Array) in /vagrant/content/client-mu-plugins/hm-content-import/inc/classes/inserter/wp/guest-author.php on line 0
Fatal error: Declaration of HMCI\Inserter\WP\Attachment::exists($canonical_id) must be compatible with HMCI\Inserter\WP\Post::exists($canonical_id, $post_type = 'post') in /vagrant/content/client-mu-plugins/hm-content-import/inc/classes/inserter/wp/attachment.php on line 0
The text was updated successfully, but these errors were encountered: