Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Are you using the custom CSS feature? If so, does the URL of the custom CSS file include the “http://www”?

    Thread Starter kitchin

    (@kitchin)

    Not using custom css.

    For custom_css_url (introduced in 3.1.5), this is a minor issue since the default is '' (empty string) anyway. But any new option added by an update does not get defined before a Dashboard save, so maybe there are ones with non-empty default that would cause problems? Don’t know.

    You could update-proof it by changing this:

    // Retrieve the plugin options
    $this->options = get_option( $this->option_name );
    
    // If the options array is empty, set defaults
    if ( ! is_array( $this->options ) )
      $this->set_defaults();
    
    // If the version number doesn't match, upgrade
    if ( $this->db_version > $this->options['db_version'] )
      $this->upgrade();

    to

    $this->set_defaults();
    
    // Retrieve the plugin options
    $opts = get_option( $this->option_name );
    
    // Merge options
    if ( is_array( $opts ) {
      $this->options = array_merge( $this->options, $opts );
    
    // If the version number doesn't match, upgrade
    if ( $this->db_version > $this->options['db_version'] )
      $this->upgrade();

    Though there may be a problem with doing the upgrade() last.

    Plugin Author Print & PDF by PrintFriendly

    (@printfriendly)

    Thanks. We’re a little behind, but have this in the queue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Notice: Undefined index: custom_css_url’ is closed to new replies.