cardinalhorizon / VAOS

Virtual Aviation Operations System
http://www.fsvaos.net
GNU General Public License v3.0
48 stars 19 forks source link

ErrorException in Collection.php line 1320: Undefined offset: 0 (Simple BID) #74

Closed iYsood closed 7 years ago

iYsood commented 7 years ago

Hello, I cannot bid any flight!

error is:

Whoops, looks like something went wrong.

1/1 ErrorException in Collection.php line 1320: Undefined offset: 0

BossOfGames commented 7 years ago

Can you please post more about the error. I am more looking specifically at the Stack Trace which shows the values going into the store function. Also what version are you running?

mario-fehr commented 7 years ago

Do you have slected a Aircraftgroup in the schedule and/or if you have multiple Airlines in the system, does the Aircraftgroup have a Plane from the selected Airline.

iYsood commented 7 years ago

hello guys, Actually after installing VAOS with last version [1.0.1a], I add 2 flight schedules and 1 aircraft, what happen? you cannot bid any flight with this aircraft, I adding another airplane and linked 2 flight فخ them you can bid flights BUT briefing and details is disable link! AND you cannot delete it!

ERROR after deleted:

FatalThrowableError in VAOS_Schedule.php line 234: Call to a member function delete() on null

in VAOS_Schedule.php line 234 at VAOS_Schedule::deleteBid('1', '1') in BiddingController.php line 98 at BiddingController->destroy('1') at call_user_func_array(array(object(BiddingController), 'destroy'), array('bid' => '1')) in Controller.php line 55 at Controller->callAction('destroy', array('bid' => '1')) in ControllerDispatcher.php line 44 at ControllerDispatcher->dispatch(object(Route), object(BiddingController), 'destroy') in Route.php line 189 at Route->runController() in Route.php line 144 at Route->run(object(Request)) in Router.php line 653 at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41 at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 43 at Authenticate->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65 at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64 at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Router.php line 655 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629 at Router->dispatchToRoute(object(Request)) in Router.php line 607 at Router->dispatch(object(Request)) in Kernel.php line 268 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Kernel.php line 150 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117 at Kernel->handle(object(Request)) in index.php line 53

mario-fehr commented 7 years ago

Your first bug I can't reconstruct. I can bid my first flight. The second bug with the deleting I can confirm.

BossOfGames commented 7 years ago
$legacybid = Legacy\Bid::where('parentid', $bid->id)->first();
$legacybid->delete();

Thought I removed this code..... Oh well. Just delete these two lines in the VAOS_Schedule.php and you will fix the bug. Will fix in next release.