Merge pull request #4091 from marc1706/ticket/14373

[ticket/14373] Do not pass arrays to strpos()

* marc1706/ticket/14373:
  [ticket/14373] Do not pass arrays to strpos()
This commit is contained in:
Tristan Darricau 2015-12-22 15:40:48 +01:00
commit 332ca57942

View file

@ -101,7 +101,7 @@ abstract class iohandler_base implements iohandler_interface
*/ */
public function add_error_message($error_title, $error_description = false) public function add_error_message($error_title, $error_description = false)
{ {
if (strpos($error_title, '<br />') !== false) if (!is_array($error_title) && strpos($error_title, '<br />') !== false)
{ {
$error_title = strip_tags(htmlspecialchars_decode($error_title)); $error_title = strip_tags(htmlspecialchars_decode($error_title));
} }