Search code examples
phphtmlspecialcharselgg

htmlspecialchars() throwing an error


I have installed elgg and none of the links work. In the error log, I see a slew of these error messages:

htmlspecialchars() expects at most 3 parameters, 4 given


Solution

  • You need PHP 5.2.3 or later. That's when the 4th parameter to htmlspecialchars was added.

    5.2.3 was released over 5 years ago!! So how old is your PHP version???

    The current old version is 5.3.16 and 5.4.6 is the version you should really use.