PHP warning

Undefined array key "Pedido"

/home1/petroza/saaracombustiveis.com.br/pedidos_page.php(7)

01 <?
02 /*********************************************************
03 *Controle de versao: 2.2
04 *********************************************************/
05 include_once("gerenciador/autoload.php");
06 $model = new Pedido();
07 if(is_array($_POST['Pedido'])){
08     $model->attributes = $_POST['Pedido'];
09     $model->data = date('d/m/Y H:i:s');
10     $model->ip = $_SERVER['REMOTE_ADDR'];
11     
12     if($model->save()){
13         $model = new Pedido();
14         $sucesso = 1;
15         header("Location: pedidos?sucesso=1");
16     }
17     
18 }
19 $erro = CHtml::errorSummary($model);

Stack Trace

#0
+
 /home1/petroza/saaracombustiveis.com.br/RequestManager.php(121): require_once("/home1/petroza/saaracombustiveis.com.br/pedidos_page.php")
116         
117         $this->setRoutes($routes);
118         $return = $this->defineRoute();
119         
120         if($return['status']){
121             require_once($return['file']);
122             exit;
123         }
124         header('location: '.$this->getBaseUrl().DIRECTORY_SEPARATOR.$this->default_route);
125         exit;
126     }
#1
+
 /home1/petroza/saaracombustiveis.com.br/index.php(26): RequestManager->run(array("/quem-somos" => "quem_somos.php", "/nosso-negocio" => "nosso_negocio.php", "/nossa-historia" => "nossa_historia.php", "/estrutura" => "estrutura_page.php", ...))
21     '/index'=>'inicial.php',
22     '/inicial'=>'inicial.php',
23     '/(?P<url>\S+)'=>'inicial.php',
24 );
25 $request_manager = new RequestManager();
26 $request_manager->run($rotas);
27 exit;
2024-04-27 18:36:32 Apache Yii Framework/1.1.13