Make WordPress Core

Ticket #26394: patch.diff

File patch.diff, 726 bytes (added by codix, 10 years ago)
  • wp-includes/option.php

    From 21fa508402a4c144944c0b291b930f1a9b4499a6 Mon Sep 17 00:00:00 2001
    From: S H Mohanjith <moha@mohanjith.net>
    Date: Wed, 4 Dec 2013 14:36:20 +0200
    Subject: [PATCH] If option is missing add the option with autoload no
    
    ---
     wp-includes/option.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/wp-includes/option.php b/wp-includes/option.php
    index ec30231..0f35a5f 100644
    a b function update_option( $option, $value ) { 
    232232                return false;
    233233
    234234        if ( false === $old_value )
    235                 return add_option( $option, $value );
     235                return add_option( $option, $value, null, 'no' );
    236236
    237237        $serialized_value = maybe_serialize( $value );
    238238