bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
140 stars 71 forks source link

Fix issues with PHP 8.1 #181

Closed bozdoz closed 1 year ago

bozdoz commented 1 year ago

RE: https://wordpress.org/support/topic/php-8-1-support-10/

bozdoz commented 1 year ago
there are a lot of deprecations and warnings on PHP 8.1 (WP 6.1).
Will a patch be released in the near future? Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 65 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 67 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php on line 69 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/other-includes/wp-security-rename-login-feature.php on line 384 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/other-includes/wp-security-rename-login-feature.php on line 398 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/functions.php on line 6865 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1107 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1108 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1109 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1110 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1111 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1112 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1115 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1116 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1119 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1120 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1121 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1122 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1125 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1126 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1127 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1128 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1131 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1416 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/leaflet-map/class.plugin-option.php:69) in /var/www/html/wp-includes/pluggable.php on line 1419
bozdoz commented 1 year ago

resolved, though there are a lot of deprecations in wordpress itself, that seem outstanding

scrobbleme commented 1 year ago

@bozdoz Would be nice to get a release with these fixes ;)

bozdoz commented 1 year ago

@scrobbleme any ideas about these other warnings? https://github.com/bozdoz/wp-plugin-leaflet-map/pull/199#issuecomment-1368269822

scrobbleme commented 1 year ago

@bozdoz Which other ones do you mean?

I just stumbled upon this: FILTER_SANITIZE_STRING The "Cannot modify header information" is probably related to this...

(Probably not possible to solve WordPress core deprecations ;)

hupe13 commented 1 year ago

@bozdoz The WordPress version and the Github version differ. I'm running a test installation with WordPress 6.2 beta 1, wp-plugin-leaflet-map and no warnings appear, not even from WordPress. If I switch to leaflet-map, these warnings about FILTER_SANITIZE_STRING appear. There are no warnings with php 8.0

@scrobbleme To not display these warnings, write in wp-config.php:

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
bozdoz commented 1 year ago

@scrobbleme Pushed to v3.2.0

scrobbleme commented 1 year ago

@hupe13 FILTER_SANITIZE_STRING is deprecated since PHP 8.1 → therefor the warning only appear on PHP 8.1 first… and they are flooding the log, which really makes it hard to debug the system.

Disabling frontend output surely should be done for production, but this doesn't solve the problem that log files get large, really fast, and it is quite hard to find the real errors…

(Warnings should as much as possible be considered as errors, in this case, it eventually will become errors in a future PHP version.)

hupe13 commented 1 year ago

Yes I know.