http://devlenovo.rulez.by/test

Exceptions

Warning: Invalid argument supplied for foreach()

Exception

ErrorException

  1.                 }
  2.                 $crest->callBatch($batch);
  3.             }
  4.         } else {
  5.             $batch = [];
  6.             foreach ($dateId as $key => $value) {
  7.                 $batch[$key 1] = [
  8.                     'method' => $method,
  9.                     'params' => [
  10.                         'id' => $value['ID'],
  11.                         'fields' => $fields
Batch->updateBatch(object(CRest), null, null, 'crm.deal.update', array('UF_CRM_1576488958' => '000', 'UF_CRM_1576488994' => '000')) in src/Controller/MyTestController.php (line 43)
  1.         $fields = [
  2.             self::DEAL_UNP => '000',
  3.             self::DEAL_FIELD_OF_ACTIVITY => '000'
  4.         ];
  5.         $result $this->batch->updateBatch($this->crest$deals['total'], $deals'crm.deal.update'$fields);
  6.         dump($result);
  7.         exit();
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 25)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Trace

ErrorException

ErrorException:
Warning: Invalid argument supplied for foreach()

  at src/Services/Base/Batch.php:93
  at App\Services\Base\Batch->updateBatch(object(CRest), null, null, 'crm.deal.update', array('UF_CRM_1576488958' => '000', 'UF_CRM_1576488994' => '000'))
     (src/Controller/MyTestController.php:43)
  at App\Controller\MyTestController->index(object(CRest), object(Batch))
     (vendor/symfony/http-kernel/HttpKernel.php:150)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:67)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:198)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:25)