Another notice, Array to string conversion
-
After the last update, I got this notice:
Notice: Array to string conversion in /var/www/vhosts/abruzzotravelling.com/httpdocs/resources/plugins/ns-seo-custom-fields/ns-seo-custom-fields.php on line 250
So, I’ve changed the code around the line 250 as follow:
$meta = get_post_meta( $post_id, $fieldname, true ); if(!is_array($meta)) { // autodetect outbound links $meta = preg_replace( '/(?<!href=[\'"])((http|https)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}((\/|\?)[\w\/#&?%~]*)?)/', '<a href="$1">$1</a>', (string)$meta ); // append it to the content $content .= " " .(string)$meta; }
Any other suggestion, maybe from developer, is so appreciate for this great plugin!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Another notice, Array to string conversion’ is closed to new replies.