As you list these response data, especially IMG, the data below BELOW:
$data = file_get_contents("php://input"); $objData = json_decode($data); $categoria = $objData->categoria->name_categoria; $titulo = $objData->titulo; $texto = $objData->texto; $data = $objData->data; $autor = $objData->autor; $status = $objData->status; $img = $objData->img->name;
{ [functions]: , __proto__: { }, autor: "Luquinhas Brito", categoria: { [functions]: , __proto__: { }, date_categoria: "12/04/2017", id_categoria: 1, name_categoria: "Geral", status_categoria: "1", type_categoria: "news" }, data: "26/04/2017", img: { [functions]: , __proto__: { }, lastModifiedDate: [date] Mon Jul 18 2016 20:53:17 GMT-0300 (Hora oficial do Brasil), name: "Capturar.JPG", size: 78623, type: "image/jpeg", webkitRelativePath: "" }, status: "1", texto: "..", titulo: "Titulo Test" }
The following is the error:
( ! ) Notice: Undefined property: stdClass::$name in C:\wamp64\www\Projeto_Sara\pages\admin\server-processing\cadastrarNews.php on line 12 Call Stack #TimeMemoryFunctionLocation 10.0005396592{main}( )...\index.php:0 20.0013432280router->routing( )...\index.php:69 30.03731824648require( 'C:\wamp64\www\Projeto_Sara\pages\admin\server-processing\cadastrarNews.php' )...\router.class.php:100