Missing argument 3 for flock
-
I’m getting these warnings for a site hosted in WPEngine.
Warning: Missing argument 3 for flock(), called in /nas/wp/www/staging/mysite/wp-content/plugins/combine-css/classes/combine-css-class.php on line 478 and defined in /nas/wp/www/common/production/php_prevent_flock.php(5) : runkit created function on line 1
The 3rd argument is entirely optional, per the PHP docs.
So there’s no reason for this Warning to be thrown.I’ve asked WPEngine to please fix their “php_prevent_flock” patch in a way that doesn’t needlessly breaks compatibility with the default flock usage.
But also thought it would be useful to let you know, as simply doing
flock( $fp, LOCK_EX, $wouldblock )
would fix the issue for anyone under this situation, with no side effects.
- The topic ‘Missing argument 3 for flock’ is closed to new replies.