bordoni / fakerpress

A WordPress plugin that implements an easy way to create fake data inside WordPress.
http://fakerpress.com
Other
338 stars 54 forks source link

Uncaught Error: unlink(): Argument #1 ($filename) must be of type string, WP_Error given #148

Closed pattisahusiwa closed 2 years ago

pattisahusiwa commented 3 years ago

I think this error raised when FakerPress cannot retrieve images from Lorem Picsum server.

Fakerpress: v0.5.1 Wordpress: v5.7 PHP: 8.0.3

Fatal error: Uncaught Error: unlink(): Argument #1 ($filename) must be of type string, WP_Error given
in **/fakerpress/src/FakerPress/Module/Attachment.php on line 67

Call stack:

unlink()
**/fakerpress/src/FakerPress/Module/Attachment.php:67
FakerPress\M\Attachment::handle_download()
**/fakerpress/src/FakerPress/Module/Attachment.php:121
FakerPress\M\Attachment::do_save()
wp-includes/class-wp-hook.php:292
WP_Hook::apply_filters()
wp-includes/plugin.php:212
apply_filters()
**/fakerpress/src/FakerPress/Module/Base.php:170
FakerPress\M\Base::save()
**/fakerpress/src/FakerPress/Provider/WP_Meta.php:166
FakerPress\P\WP_Meta::meta_type_attachment()
call_user_func_array()
**/fakerpress/vendor/fzaninotto/faker/src/Faker/Generator.php:228
Faker\Generator::format()
**/fakerpress/vendor/fzaninotto/faker/src/Faker/Generator.php:285
Faker\Generator::__call()
call_user_func_array()
**/fakerpress/src/FakerPress/Module/Meta.php:151
FakerPress\M\Meta::generate()
**/fakerpress/src/FakerPress/Module/Post.php:193
FakerPress\M\Post::parse_request()
**/fakerpress/src/FakerPress/Ajax.php:76
FakerPress\Ajax::module_generate()
wp-includes/class-wp-hook.php:292
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:316
WP_Hook::do_action()
wp-includes/plugin.php:484
do_action()
wp-admin/admin-ajax.php:187
bordoni commented 2 years ago

This was resolved earlier on in the year, but not yet released, will get it done next couple of weeks.