[ad_1]
Hi @tmpete,
Thank you for providing the error message. It appears that the issue is caused by a type error. The error message indicates that the implode() function is being called with a string as its second argument, while it expects an array.
I have updated plugin with 1.1.8 version.
However, if you have access to the following file: /htdocs/wp1033564_9MD5WDX7NZ/www/staging/wp-content/plugins/enable-cors/src/Helpers/Cors.php, you can resolve this issue by making the following changes to lines 124-129 in the code:
if ( array_key_exists( 'allowedMethods', $options ) ) {
header( 'Access-Control-Allow-Methods: ' . is_array( $options['allowedMethods'] ) === 1 ? implode( ',', $options['allowedMethods'] ) : $options['allowedMethods'] );
}
if ( array_key_exists( 'allowedHeader', $options ) ) {
header( 'Access-Control-Allow-Headers: ' . is_array( $options['allowedHeader'] ) === 1 ? implode( ', ', $options['allowedHeader'] ) : $options['allowedHeader'] );
}
