Forum Replies Created

Viewing 1 replies (of 1 total)
  • I’ve been struggling with this on IIS and have come up with a hack that seems to work. With my host, magic_quotes_gpc is on, and there is no way to turn it off. The problem starts on line 14 of capabilities.php – $this->roles =get_option($this->role_key);
    The get_option function gets user role data that illamental refers to above. magic_quotes_gpc escapes the quotes, so the following lines in capabilities.php don’t know how to handle the return value.
    I copied the get_options function (actually get_settings, which get_options calls), and changed the call on line 14 to point to the new function. The only difference is the new function uses stripslashes when getting the row from the db. Here’s the change in the new function:
    $value = stripslashes(wp_cache_get($setting, 'options'));
    // original: $value = wp_cache_get($setting, 'options');

    I originally tried to just change get_settings, but it is used by other functions and errors popped up in other places.
    Magic_quotes_gpc still causes problems elsewhere, like if you have a single quote or apostrophe in a post it causes an sql error. I’m still working on that.

Viewing 1 replies (of 1 total)