WPIntell

Source evidence

mkdir(): File exists

PhastPress · support · 2023-06-19T10:15:00+00:00

mixedsentiment
highseverity
0.88relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 28 rows with source links

21.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
iontulburedev resolved
Hi. I get the mkdir(): File exists PHP Warning on frontend at wp-content/plugins/phastpress/sdk/phast.php:182 . Env details: PHP: 8.1.18 Web server: nginx/1.22.1 WordPress: 6.2.2 Theme: Engitech 1.6.1 This is not a bug. At least not in this plugin. The “@” error suppression operator is used to prevent this warning from being logged, as it is expected during normal operation. Query Monitor apparently does not respect this. @kiboit Hi, thanks for the answer. https://www.php.net/manual/en/language.operators.errorcontrol.php – here it is stated that – quote ” Prior to PHP 8.0.0, it was possible for the @ operator to disable critical errors that will terminate script execution. For example, prepending @ to a call of a function which did not exist, by being unavailable or mistyped, would cause the script to terminate with no indication as to why. “ Is this somehow related to why Query Monitor ignores the @ operator ? — As i understand we can ignore these errors caught by QM at frontend . @kiboit I deactivated Query Monitor and instead used this snippet of code : ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); The warning doesn’t appear. Thanks. That quote is about critical errors. This concerns a warning which is not a critical error. It is up to custom error handling code, such as that implemented by Query Monitor, to respect error suppression. But something changed in PHP 8 that means that Query Monitor’s code needs to be updated in order to correctly detect suppressed errors. I’ve left a note on Query Monitor’s support forum. If they get around to updating this, it should make sure that these suppressed errors show up as such in Query Monitor. @kiboit Thanks for the feedback !

Comments

5 shown
Albert Peschar 2023-07-26T12:07:00+00:00

This is not a bug. At least not in this plugin. The “@” error suppression operator is used to prevent this warning from being logged, as it is expected during normal operation. Query Monitor apparently does not respect this.

iontulburedev 2023-07-26T14:29:00+00:00

@kiboit Hi, thanks for the answer. https://www.php.net/manual/en/language.operators.errorcontrol.php – here it is stated that – quote ” Prior to PHP 8.0.0, it was possible for the @ operator to disable critical errors that will terminate script execution. For example, prepending @ to a call of a function which did not exist, by being unavailable or mistyped, would cause the script to terminate with no indication as to why. “ Is this somehow related to why Query Monitor ignores the @ operator ? — As i understand we can ignore these errors caught by QM at frontend .

iontulburedev 2023-07-27T07:21:00+00:00

@kiboit I deactivated Query Monitor and instead used this snippet of code : ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); The warning doesn’t appear. Thanks.

Albert Peschar 2023-07-27T07:35:00+00:00

That quote is about critical errors. This concerns a warning which is not a critical error. It is up to custom error handling code, such as that implemented by Query Monitor, to respect error suppression. But something changed in PHP 8 that means that Query Monitor’s code needs to be updated in order to correctly detect suppressed errors. I’ve left a note on Query Monitor’s support forum. If they get around to updating this, it should make sure that these suppressed errors show up as such in Query Monitor.

iontulburedev 2023-07-27T07:49:00+00:00

@kiboit Thanks for the feedback !