ensignlee / ssbook

ssbook
5 stars 3 forks source link

"undefined index" errors #105

Closed ensignlee closed 13 years ago

ensignlee commented 13 years ago

To replicate the problem, I filtered by date 9/1 to 9/13 and then tried to sort A-Z. I get this error at the top of the screen:

Notice (8): Undefined index: game_date [APP/controllers/bets_controller.php, line 1001] Code | Context

    $sortKey = $default ? 'date' : $this->sortKey;

    $left = $oleft[$sortKey];

$oleft = array( "betid" => "35", "scoreid" => "1202", "date" => "2010-09-12 11:00:00", "league" => "NFL", "beton" => "Colts", "type" => "spread", "line" => -2.5, "home" => "Texans", "visitor" => "Colts", "risk" => "250", "odds" => "107", "winning" => -250, "book" => "Matchbook", "direction" => "visitor", "tag" => "", "parlays" => false, "created" => "0000-00-00 00:00:00" ) $oright = array( "betid" => "16", "scoreid" => "1282", "date" => "2010-09-04 17:30:00", "league" => "NCAAF", "beton" => "Vanderbilt", "type" => "spread", "line" => 3.5, "home" => "Vanderbilt", "visitor" => "Northwestern", "risk" => "275.25", "odds" => "-110", "winning" => 250.22727272727, "book" => "Matchbook", "direction" => "home", "tag" => "", "parlays" => false, "created" => "0000-00-00 00:00:00" ) $default = false $sortKey = "game_date"

BetsController::_sort_bets() - APP/controllers/bets_controller.php, line 1001 usort - [internal], line ?? BetsController::view() - APP/controllers/bets_controller.php, line 844 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 204 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171 [main] - APP/webroot/index.php, line 83

Notice (8): Undefined index: game_date [APP/controllers/bets_controller.php, line 1002]

camerondavison commented 13 years ago

should be date, not game_date. closed by 70cb750198d01e1d5f1e43b9eff44d3f62df4a4c