-
FYI
Getting this error:
{ "installName": "", "environment": "PROD", "type": "error", "date": "2024-06-26T16:59:08.288Z", "severity": null, "client": null, "message": "PHP Fatal error: Uncaught TypeError: flock(): Argument #1 ($stream) must be of type resource, bool given in wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php:465#012Stack trace:#012#0 wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php(465): flock(false, 2)#012#1 wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php(227): set_cache_file('fv_player_pro_v...', Object(stdClass), '369719641')#012#2 wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php(39): func__get_vimeo('https://vimeo.c...')#012#3 wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php(31): ajax__get_vimeo()#012#4 {main}#012 thrown in wp-content/plugins/fv-player-pro/fv-vimeo-ajax.php on line 465", "uuid": "013de717-d2be-48fb-9801-93bcccfa8eea" }
Replaced it with this code and it is working:
/* original code if( !file_exists($htaccess) ) { $file = fopen($htaccess,"w+"); if (flock($file,LOCK_EX)) { fwrite($file,'deny from all'); flock($file,LOCK_UN); } fclose($file); }*/ /* NEW CODE */ if (!file_exists($htaccess)) { $file = fopen($htaccess, "w+"); if ($file !== false) { // Check if the file was successfully opened if (flock($file, LOCK_EX)) { fwrite($file, 'deny from all'); flock($file, LOCK_UN); } else { error_log("Failed to lock file: $htaccess"); } fclose($file); } else { error_log("Failed to open file: $htaccess"); } }