Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Uncaught Error: Call to a member function exists() on boolean .../admin/AmazonAI-PollyService.php:291 #21

Open
MaximOrlovsky opened this issue Feb 18, 2019 · 3 comments

Comments

@MaximOrlovsky
Copy link
Contributor

Every time a I publish or update the post I get the following error:

PHP Fatal error:  Uncaught Error: Call to a member function exists() on boolean in /site/public/wp-content/plugins/amazon-polly/admin/AmazonAI-PollyService.php:291

Stack trace:
#0 /site/public/wp-content/plugins/amazon-polly/admin/AmazonAI-PollyService.php(111): AmazonAI_PollyService->convert_to_audio(2838460, '22050', 'Matthew', Array, true, '')"
#1 /site/public/wp-includes/class-wp-hook.php(286): AmazonAI_PollyService->generate_audio(2838460)
POST /wp-admin/admin-post.php" 500
#2 /site/public/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#3 /site/public/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
#4 /site/public/wp-content/plugins/amazon-polly/admin/AmazonAI-BackgroundTask.php(93): do_action_ref_array('amazon_polly_ba...', Array)
#5 /site/public/wp-includes/class-wp-hook.php(286): AmazonAI_BackgroundTask->run('')
#6 /site/public/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#7 /site/public/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#8 /site/public/..."
@MaximOrlovsky
Copy link
Contributor Author

Why you use $wp_filesystem?

It's always boolean true on my instance, and never WP_Filesystem_* object

@tstachlewski
Copy link
Contributor

Hi,
Because this is the standard way of interacting with file system (https://codex.wordpress.org/Filesystem_API) - your error is a bit unusual, I have never seen it before. Which WordPress version are you using? Is it managed version?
Cheers,

@MaximOrlovsky
Copy link
Contributor Author

MaximOrlovsky commented Feb 18, 2019

WordPress 5.0.3 (the latest at the moment)
PHP-FPM 7.1
Apache 2.4

I rewrote all used filesystem functions to direct functions. Like $wp_filesystem->delete( $file_temp_full_name ) to unlink( $file_temp_full_name ) and it works, but It drops me from any plugin updates.

Finding a better solution would be great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants