Jump to content

[solved] Bid/Pirep 'strict standards' errors


Recommended Posts

Posted

Disregard, I was placing the code in the wrong file.

--------------------------------

Running SimPilot's 5.5.1

Adding a bid returns the following message: "Strict Standards: Non-static method SchedulesData::setbidonschedule() should not be called statically..."

The bid is successfully added though.

Filing a pirep returns two 'setbidonschedule' errors plus one for CodonEvent::hasstop(). Again, the pirep goes through successfully but the errors are unpleasant.

I've seen suggestions for adding a code to the local.config to ignore the errors but that code is already there -->that's because it needs to be in modules/schedules/schedules.php

Posted

also for me same error.

Strict Standards: Non-static method SchedulesData::setBidOnSchedule() should not be called statically in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\newvar\core\common\SchedulesData.class.php on line 785

Bid added

public static function addBid($pilotid, $routeid) {
    $pilotid = DB::escape($pilotid);
    $routeid = DB::escape($routeid);
    if (DB::get_row('SELECT bidid FROM ' . TABLE_PREFIX . 'bids
  WHERE pilotid=' . $pilotid . ' AND routeid=' . $routeid)) {
	    return false;
    }	    $pilotid = DB::escape($pilotid);
    $routeid = DB::escape($routeid);
    $sql = 'INSERT INTO ' . TABLE_PREFIX . 'bids (pilotid, routeid, dateadded)
   VALUES (' . $pilotid . ', ' . $routeid . ', NOW())';	    DB::query($sql);
    self::setBidOnSchedule($routeid, DB::$insert_id);	    if (DB::errno() != 0) return false;
    return true;
   }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...