WordPress.org

Ready to get started?Download WordPress

Forums

warning while upgrading to version 3.5 (1 post)

  1. jenifer12
    Member
    Posted 1 year ago #

    When I try to upgrade WP to 3.5 I am getting the following errors:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/mosaicma/public_html/lg/wp-content/plugins/LocalGiant_WPF/library/LocalGiant/Module/Loader.php on line 1634 and defined in /home/mosaicma/public_html/lg/wp-includes/wp-db.php on line 990

    Warning: Cannot modify header information - headers already sent by (output started at /home/mosaicma/public_html/lg/wp-includes/wp-db.php:990) in /home/mosaicma/public_html/lg/wp-content/plugins/LocalGiant_WPF/modules/VisitorTracking/Module.php on line 225

    can anybody help please ?
    regarding 1st warning
    code in plugin loader.php is (there may be some error in wordpress queries here but i am not able to fix)

    global $wpdb;

    $qry = "select * from ".$wpdb->prefix."localgiant_activation";

    $resultSession = $wpdb->get_results($qry, OBJECT);

    $req = wp_remote_get('https://api.localgiant.com/auth/auth.php?key='.$resultSession[0]->key,array('sslverify' => false));

    if(($req['body']!='false')||(trim($req['body'])==''))
    {

    $prod_id = $req['body'];

    require_once(ABSPATH . 'wp-admin/includes/upgrade.php');

    $sql = $wpdb->prepare("CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."localgiant_product(
    id int(11) NOT NULL auto_increment,
    product_id int(11) NOT NULL,
    PRIMARY KEY (id)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;");
    dbDelta($sql);

    $qry = "Select * from ".$wpdb->prefix."localgiant_product";

    $resultSession = $wpdb->get_results($qry, OBJECT);

    if($resultSession==null)
    {
    $qry = "Insert Into ".$wpdb->prefix."localgiant_product(id,product_id) values(NULL,".$prod_id.")";

    $resultSession = $wpdb->get_results($qry, OBJECT);
    }

Topic Closed

This topic has been closed to new replies.

About this Topic