Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Another teeny problem

edited July 2005 in Vanilla 1.0 Help
I wouldn't call this a bug as its simply a problem that my php isn't the right version. html_entity_decode() was introduced in php 4.3.0. I have 4.2.2, so whenever I try to save forum settings I can't, getting an undefined function error instead. I also got the same problem doing an automatic install, and I don't now where else html_entity_decode() might be used. I'm guessing this means vanilla has a minimum requirement of php 4.3.0, unless anyone has any nifty workarounds? Is this time for me to nag to my host to upgrade php?

Comments

  • Hmmm, I think in php versions pre 4.3.x it was called something else. Perhaps a switch to detect versions and switch to the correct handler to fall back on might be in order here.
  • But yeah, I'd be nagging my host for the latest stable php 4.x release.
  • MarkMark Vanilla Staff
    No, don't tell your host to upgrade.

    That is an easy bug to fix, and it will be fixed in the next revision. In the meantime you can fix it yourself by doing this: open up the library/utility.functions.php and add this to the bottom of the page (before the ?>):
    // Create the html_entity_decode function for users prior to PHP 4.3.0
    if (!function_exists("html_entity_decode")) {
    function html_entity_decode($String) {
    $TranslationTable = get_html_translation_table(HTML_ENTITIES);
    $TranslationTable = array_flip($TranslationTable);
    return strtr($String, $TranslationTable);
    }
    }
  • Hosts should seriously upgrade to at least 4.3.11 for security concerns, but I digress.
  • This isnt funny. I definately posted a response to this, cause i put in a funny little quirk about 'teeny' problems.
  • Wow, this just keeps getting better, thanks mark. So how did that quirk go then?
This discussion has been closed.