I have added an email contact form to my site using a guide from here:
https://www.boutell.com/newfaq/creating/email.html
It works fine, except for the following error message that appears on the page:
Warning: implode(): Invalid arguments passed in /var/www/vip6/sites/vip4092987/httpd/htdocs/email.php on line 130
And the offending code:
<?php
# Shift back into PHP mode for a moment to display
# the error message, if there was one
if (count($messages) > 0) {
$message = implode("<br>\n", $messages);
echo("<h3>$message</h3>\n");
}
?>
I've tried contacting the author site without any response, how do I resolve this?
var_dump($messages);to verify it contains what you think it contains.$messagescontains. Most likely it only has 1 element, and since php is (mostly) dynamically typed its not going to be seen as an array when passed intoimplode().