TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given
-
Hey there, we’ve started to receive this error multiple times, which seems to be very uncommon. Sometimes,
$_GET['page']is an array and it triggers the exception. It’s appearing in this line of code, can you please consider in converting $_GET[‘page’] to string also?$is_weglot_settings_page = isset( $_GET['page'] ) && strpos( $_GET['page'], 'weglot-settings' ) !== false; //phpcs:ignoreUncaught exception ‘TypeError’ with message ‘strpos(): Argument #1 ($haystack) must be of type string, array given’ in /var/www/wp-content/plugins/weglot/src/services/class-option-service-weglot.php:433 in strpos called at /var/www/wp-content/plugins/weglot/src/services/class-option-service-weglot.php (433)
You must be logged in to reply to this topic.