humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.92k stars 389 forks source link

Stream_Wrapper::stream_set_option not implemented warning #592

Open aadilovic-tfb opened 2 years ago

aadilovic-tfb commented 2 years ago

We are using S3 Uploads version 3.0.4 and are encountering an error when navigating to a specific page added by the Ultimate Addons for WPBakery Page Builder plugin.

Warning: include(): S3_Uploads\Stream_Wrapper::stream_set_option is not implemented! in plugins/ultimate-addons-for-visual-composer/modules/ultimate_icon_manager.php on line 363

Going to that specific line and ignoring irrelevant information, it seems what is occurring is that they are effectively calling your custom stream wrapper implementation (inc/class-stream-wrapper.php) using the include keyword. According to the Backward Incompatible Changes log when migrating from PHP 7.3.x to 7.4.x (https://www.php.net/manual/en/migration74.incompatible.php), using include/require on a stream will invoke stream_set_option as of PHP 7.4. The manual states that custom stream wrapper implementations can simply return false as a sufficient implementation.

This is just a preliminary look, however adding the stream_set_option function to your stream wrapper implementation and returning false seems to fix the issue on our end.