ArtZ91
Forum Replies Created
-
Deprecation reproduced by request like:
curl -v --http1.1 "https://mysite.com//admin?mdrv=mysite.com"I think it’s because two slashes presents in request and nginx configuration not handle this case correctly.
@hjogiupdraftplus I found this:
2025/10/** **:**:** [error] 3525965#3525965: *4224278 FastCGI sent in stderr: “PHP message: [E_DEPRECATED]: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/mysite.com/html/wp-includes/formatting.php on line 2829” while reading response header from upstream, client: (some Netherlands IP-address), server: mysite.com, request: “GET //bxss.me HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php8.3-fpm.sock:”, host: “mysite.com”Forum: Plugins
In reply to: [WP Super Cache] rmdir: No such file or directoryI think it’s file permission issue, but it’s hard to explain what wrong.
Forum: Plugins
In reply to: [WP Super Cache] rmdir: No such file or directoryMaybe need wrap this code like that:
if (is_dir($dir)) {
@rmdir($dir);
}Or temporarily disable error handler:
$old_error_handler = set_error_handler(null);
try {
if (is_dir($dir)) {
rmdir($dir);
}
} finally {
// Restore error handler
set_error_handler($old_error_handler);
}- This reply was modified 9 months, 2 weeks ago by ArtZ91.
Forum: Plugins
In reply to: [WP Super Cache] rmdir: No such file or directoryI use PHP method
set_error_handlerto catch any errors andset_exception_handlerto catch exceptions. I see that@rmdir( $dir );at 3269 cause E_WARNING with messageNo such file or directory, it’s strange, isn’t?Need more detail code handling to know, what happening:
— Maybe it’s really no directory and need to skiprmdirto avoid warning.
— Maybe it’s some permission issue and need additional checks in code, idk.That fact of using
@operator looks strange, you trying to suppress error output, but the error still visible forset_error_handlerand still logged in that custom handler logic.Forum: Plugins
In reply to: [WP Mail Logging] Incorrect Headers format in modal row$headers = [];
$headers[] = 'Reply-To: John Smith <john.smith@somesite.com>';
$sent = wp_mail( $to, $subject, $message, $headers );I check the problem again on fresh WordPress installation with minimal custom theme.
Error was catched by customset_error_handlermethod added infunctions.phpIn
admin.php:1768theunlinkmethod silenced with@operator.I think the problem that
@operator only hide warning from being displayed, but it’s still be catched byset_error_handlerI use this code usually to detect deprecations or
_doing_it_wrongWP notices.set_error_handler( function ( $errNo, $errStr, $errFile, $errLine ) {
$errorLevels = [
E_ERROR => 'E_ERROR',
E_WARNING => 'E_WARNING',
E_PARSE => 'E_PARSE',
E_NOTICE => 'E_NOTICE',
E_CORE_ERROR => 'E_CORE_ERROR',
E_CORE_WARNING => 'E_CORE_WARNING',
E_COMPILE_ERROR => 'E_COMPILE_ERROR',
E_COMPILE_WARNING => 'E_COMPILE_WARNING',
E_USER_ERROR => 'E_USER_ERROR',
E_USER_WARNING => 'E_USER_WARNING',
E_USER_NOTICE => 'E_USER_NOTICE',
E_STRICT => 'E_STRICT',
E_DEPRECATED => 'E_DEPRECATED',
E_USER_DEPRECATED => 'E_USER_DEPRECATED',
E_ALL => 'E_ALL',
];
$errorLevel = $errorLevels[ $errNo ] ?? 'Unknown error';
$log = sprintf( "[%s]: %s in %s on line %d",
$errorLevel,
$errStr,
$errFile,
$errLine
);
error_log( $log );
$logExtended = in_array( $errNo, [
E_USER_NOTICE,
E_DEPRECATED,
E_USER_DEPRECATED,
E_WARNING,
E_ERROR
] );
if ( $logExtended ) {
$log_ext = json_encode( [
'ERROR_LEVEL' => $errorLevel,
'HTTPS' => $_SERVER['HTTPS'] ?? 'OFF',
'HTTP_HOST' => $_SERVER['HTTP_HOST'] ?? 'NULL',
'HTTP_REFERER' => $_SERVER['HTTP_REFERER'] ?? 'NULL',
'HTTP_USER_AGENT' => $_SERVER['HTTP_USER_AGENT'] ?? 'NULL',
'IS_WP_CRON' => defined( 'DOING_CRON' ) && DOING_CRON,
'REMOTE_ADDR' => $_SERVER['REMOTE_ADDR'] ?? 'NULL',
'REQUEST_METHOD' => $_SERVER['REQUEST_METHOD'] ?? 'NULL',
'REQUEST_URI' => $_SERVER['REQUEST_URI'] ?? 'NULL',
'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'] ?? 'NULL',
'SERVER_NAME' => $_SERVER['SERVER_NAME'] ?? 'NULL',
] );
$backtrace = print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), true );
error_log( $log_ext );
error_log( $backtrace );
}
} );It might be worth checking if this is related to core ticket 63316, because server path passed into untrailingslashit method in
wp-security-process-renamed-login-page.php:273, and empty host it is objective in ticket 63316.https://i2.paste.pics/89d9baa9e1d6308eb2a6337f9ba29357.png
Google Chrome 105, Windows 10
Forum: Plugins
In reply to: [Always Edit In HTML] TranslationHi there, can you add translations for this plugin?