Problem with admin-ajax.php
-
In
admin/product/bytes-product-tab-for-role-customer-based-price.php L~487
I detected fatal bug – ERROR 500. In some cases string in URL$_GET["exclude"]
is not like “array” and have problem with sanitize. I hotfixed in live production shop, but your code still have this issue. Please fix it.// hotfix
$exclude_raw = isset( $_GET['exclude'] ) ? $_GET['exclude'] : '[]';
$exclude_array = json_decode( $exclude_raw, true );
if ( is_array( $exclude_array ) ) {
$exclude = array_map( 'sanitize_key', $exclude_array );
} else {
$exclude = array();
}
// problem line of code
// $exclude = isset( $_GET[ 'exclude' ] ) ? array_map( "sanitize_key", $_GET[ 'exclude' ] ) : array();
- You must be logged in to reply to this topic.