Support » Plugin: WP Store Locator » Add plugin on Github for pull requests

  • Resolved mhogas

    (@mhogas)


    Hey there,

    I’ve noticed a lot of PHP notices, eg:

    PHP Notice:  Undefined index: deregister_gmaps in /../wp-content/plugins/wp-store-locator/frontend/class-frontend.php on line 1557 
    
    Notice: Undefined index: api_language in /../wp-content/plugins/wp-store-locator/inc/wpsl-functions.php on line 36
    
    Notice: Undefined index: api_region in /../wp-content/plugins/wp-store-locator/inc/wpsl-functions.php on line 36
    
    Notice: Undefined index: api_browser_key in /../wp-content/plugins/wp-store-locator/inc/wpsl-functions.php on line 36
    
    Notice: Undefined index: autocomplete in /../wp-content/plugins/wp-store-locator/inc/wpsl-functions.php on line 49
    
    Notice: Undefined index: api_region in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 325
    
    Notice: Undefined index: editor_hour_format in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 349
    
    Notice: Undefined index: start_latlng in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 385
    
    Notice: Undefined index: editor_map_type in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 352
    
    Notice: Undefined index: store_marker in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 356
    
    Notice: Undefined index: api_region in /../wp-content/plugins/wp-store-locator/admin/class-admin.php on line 360

    I could get involved fixing these issues so if you’ll create a Github repository it would be great.

    Thanks!
    Marius

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Which version are you using? I’m not seeing those warning in my log files.

    Do they keep showing up, or did it just happen once?

    Thread Starter mhogas

    (@mhogas)

    Thanks for getting back @tijmensmit! Using latest version, however i just figured out that this happens because i’m adding the line below to temporarily disable them.

    unregister_setting( 'wpsl_settings', 'wpsl_settings' );

    That’s because i’m getting an error in validate_server_key function (of WPSL_Settings) which is causing a fail in my project, in which i’m importing some demos by ajax.

    Anyway, i noticed that the function validate_server_key runs even though $server_key is empty. I would suggest a simple condition eg: https://d.pr/i/k3NiQ5 .

    From what i seen in the code, the function runs because in sanitize_settings() there’s no check for the $server_key eg: https://d.pr/i/kYywZa .

    Would be great if you could add a condition in any of these 2 locations.

    Thanks!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    That’s a very valid point 🙂

    Will make the check conditional in the next update, thanks for letting me know.

    Thread Starter mhogas

    (@mhogas)

    Awesome! Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add plugin on Github for pull requests’ is closed to new replies.