Plugin Directory

Changeset 515095


Ignore:
Timestamp:
03/06/2012 03:14:46 AM (14 years ago)
Author:
dwc
Message:

Avoid some PHP notices due to saving options

Location:
http-authentication/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • http-authentication/trunk/http-authentication.php

    r487647 r515095  
    4343            }
    4444
    45                         $current_db_version = isset($this->options['db_version']) ? $this->options['db_version'] : 0;
     45            $current_db_version = isset($this->options['db_version']) ? $this->options['db_version'] : 0;
    4646            $this->upgrade($current_db_version);
    4747            $this->options['db_version'] = $this->db_version;
    4848            update_option($this->option_name, $this->options);
    49                 }
     49        }
    5050    }
    5151
     
    245245    function _get_base_url() {
    246246        $home = parse_url(home_url());
    247         $base = str_replace(array($home['path'], $home['query'], $home['fragment']), '', home_url());
     247
     248        $base = home_url();
     249        foreach (array('path', 'query', 'fragment') as $key) {
     250            if (! isset($home[$key])) continue;
     251            $base = str_replace($home[$key], '', $base);
     252        }
    248253
    249254        return $base;
  • http-authentication/trunk/options-page.php

    r429816 r515095  
    4040        $output = $input;
    4141        $output['db_version'] = $this->plugin->db_version;
     42        $output['allow_wp_auth'] = isset($input['allow_wp_auth']) ? (bool) $input['allow_wp_auth'] : false;
     43        $output['auto_create_user'] = isset($input['auto_create_user']) ? (bool) $input['auto_create_user'] : false;
    4244
    4345        return $output;
  • http-authentication/trunk/readme.txt

    r493364 r515095  
    137137== Changelog ==
    138138
     139= 4.5 =
     140* Avoid some PHP notices due to saving options (William Schneider)
     141
    139142= 4.4 =
    140143* Update CSS to correctly center login button on WordPress 3.3
Note: See TracChangeset for help on using the changeset viewer.