SimpleMap Store Locator
Getting Code Warning and now Map doesn't work in 3.5 RC4 (3 posts)

  1. Robert Dall
    Posted 3 years ago #


    In WordPress 3.5 RC4 I am getting a warning that says:

    Warning: Missing argument 2 for wpdb::prepare(), called in /site/wp-content/plugins/simplemap/classes/locations.php on line 677 and defined in /home/uprising/public_html/wp-includes/wp-db.php on line 990

    See Screenshot of Warning Message

    And although all of my locations are still in the database and listed in the admin area they now don't show up in the map area.



  2. wp_joost
    Posted 3 years ago #

    Hello RDall,

    add a second parameter to the wpdb->prepare function.

    change :
    wpdb->prepare( " ...QUERY_HERE... " );

    to :
    wpdb->prepare( " ...QUERY_HERE... ", $id);

    Source : http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

  3. wp_joost
    Posted 3 years ago #

    I've posted this in another thread but i'll post it here too for convenience :

    You also need to change the remaining 'wpdb->prepare' in other files (xml-search.php, locations.php, import-export.php)

    Or you can click here to download the 3 corrected php files and place them in the plugins/simplemap/classes folder.

    (Sorry for doublepost, couldn't edit my last post for whatever reason)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SimpleMap Store Locator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic