Make WordPress Core

Changeset 978


Ignore:
Timestamp:
03/16/2004 05:36:56 PM (20 years ago)
Author:
emc3
Message:

Fixed bug that caused empty string options to receive a '0' value on update. This was breaking fileupload_allowedusers, for example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options.php

    r969 r978  
    7575                $old_val = stripslashes($option->option_value);
    7676                $new_val = $_POST[$option->option_name];
    77                 if (!$new_val) $new_val = 0;
     77                if (!$new_val) {
     78                    if (3 == $option->option_type)
     79                        $new_val = '';
     80                    else
     81                        $new_val = 0;
     82                }
    7883                if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_value = 'closed';
    7984                if ($new_val !== $old_val) {
Note: See TracChangeset for help on using the changeset viewer.