2010
06.11
1
ErrorException [ Warning ]: htmlspecialchars() expects at most 3 parameters, 4 given

If Kohana 3 throws this exception, that means that your currently installed PHP version is lower than 5.2.3 .
This can be easily be fixed by updating PHP to the latest stable version (recommended) or by changing one of Kohana (not recommended).

To fix it code wise open following file with your preferred editor

1
/system/classes/kohana/html.php

Search for…

1
return htmlspecialchars((string) $value, ENT_QUOTES, Kohana::$charset, $double_encode);

… and change it into

1
return htmlspecialchars((string) $value, ENT_QUOTES, Kohana::$charset);

Done :)

1 comment so far

Add Your Comment
  1. Thanks! You just saved my rear! :)

*