Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
security.php: htmlentities
  • Since I updated to the last version of the core, I got this error message.
    Coming from security.php in function htmlentities
    Anybody got an idea why ? Notice! ErrorException [ Notice ]: Object of class Model_User could not be converted to int COREPATH/classes/security.php @ line 169: 168: // Prevent looping & encoding twice
    169: if (in_array($value, $already_cleaned))
    170: { Thanks!
  • You need to update from the develop branch the line should read:
     static $already_cleaned = array();
    
      // Nothing to escape for non-string scalars, or for already processed values
      if (is_bool($value) or is_int($value) or is_float($value) or in_array($value, $already_cleaned, true))
      {
       return $value;
      }
    

    By the way this also fixes an infinite loop issue with the e() function.
  • it works, thx
  • Your welcome :-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion