WordPress.org

Make WordPress Core

Changeset 10286


Ignore:
Timestamp:
12/31/2008 10:09:57 PM (11 years ago)
Author:
ryan
Message:

Turn off magic_quotes_sybase. It prevents addslashes from escaping backslashes. fixes #8757 for trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r10220 r10286  
    530530    }
    531531
     532error_log(var_export($newvalue, true));
    532533    $notoptions = wp_cache_get( 'notoptions', 'options' );
    533534    if ( is_array( $notoptions ) && isset( $notoptions[$option_name] ) ) {
     
    538539    $_newvalue = $newvalue;
    539540    $newvalue = maybe_serialize( $newvalue );
    540 
     541error_log(var_export($newvalue, true));
     542   
    541543    $alloptions = wp_load_alloptions();
    542544    if ( isset( $alloptions[$option_name] ) ) {
     
    546548        wp_cache_set( $option_name, $newvalue, 'options' );
    547549    }
     550$prep = $wpdb->prepare( "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name );
     551error_log(var_export($prep, true));
    548552
    549553    $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name ) );
     
    588592    wp_protect_special_option( $name );
    589593    $safe_name = $wpdb->escape( $name );
     594    error_log('Incoming ' . var_export($value, true));
    590595    $value = sanitize_option( $name, $value );
    591596
     
    598603    $value = maybe_serialize( $value );
    599604    $autoload = ( 'no' === $autoload ) ? 'no' : 'yes';
    600 
     605error_log('Serialize ' . var_export($value, true));
    601606    if ( 'yes' == $autoload ) {
    602607        $alloptions = wp_load_alloptions();
     
    613618        wp_cache_set( 'notoptions', $notoptions, 'options' );
    614619    }
    615 
     620$prep = $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload );
     621error_log('Prepare ' . var_export($prep, true));
    616622    $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) );
    617623
  • trunk/wp-settings.php

    r9596 r10286  
    1616    @ini_set('memory_limit', WP_MEMORY_LIMIT);
    1717
     18set_magic_quotes_runtime(0);
     19@ini_set('magic_quotes_sybase', 0);
    1820
    1921/**
Note: See TracChangeset for help on using the changeset viewer.