Moderators mark1million Posted January 21, 2010 Moderators Report Posted January 21, 2010 This is something that i never seem to get round to but i have the following error with my hub / routemap, Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'RouteMap::hubmap' was given in /home/mgrant/public_html/grantsva.com/core/classes/MainController.class.php on line 292 I posted about a year ago and Nabeel posted a line of code to add, is this still relevant? Im on the latest beta but its never worked now or ages Quote
Administrators Nabeel Posted January 21, 2010 Administrators Report Posted January 21, 2010 What's the full code you're calling? Quote
Moderators mark1million Posted January 21, 2010 Author Moderators Report Posted January 21, 2010 <?php class RouteMap extends CodonModule { public function __construct() { CodonRewrite::AddRule('routemap', array('maptype', 'hub')); } public function index() { if($this->get->maptype == 'hubmap') { // Show hubmap $params = array( 's.depicao'=>$this->get->hub, 's.enabled'=>1 ); // Show only 20 routes $allschedules = SchedulesData::findSchedules($params, Config::Get('ROUTE_MAP_SHOW_NUMBER')); if(count($allschedules) == 0) { echo 'There are no departures from this airport!'; return; } $airportinfo = OperationsData::GetAirportInfo($this->get->hub); echo '<h3>Departures from '.$airportinfo->name.'</h3>'; } else { # Get all of the schedule $allschedules = SchedulesData::findSchedules(array('s.enabled'=>1), Config::Get('ROUTE_MAP_SHOW_NUMBER')); } $this->set('allschedules', $allschedules); $this->render('flown_routes_map.tpl'); } } Quote
Administrators Nabeel Posted January 22, 2010 Administrators Report Posted January 22, 2010 I mean, you're calling that from somewhere, what's that code? Quote
Moderators mark1million Posted January 22, 2010 Author Moderators Report Posted January 22, 2010 Ah sorry, from an added page in the pages folder, <a href="http://grantsva.com/index.php/routemap/hubmap/egkk" title="EGKK" target="">Gatwick</a> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.