Bläddra i källkod

Fixes in the location API.

Iñigo Valentin 9 år sedan
förälder
incheckning
580e3176fe
1 ändrade filer med 6 tillägg och 1 borttagningar
  1. 6 1
      www/API/v1/location.php

+ 6 - 1
www/API/v1/location.php

@@ -60,6 +60,8 @@
 		//Bad request
 		//Bad request
 		http_response_code(400);
 		http_response_code(400);
 		$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
 		$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+		error_log($error);
+		exit(-1);
 	}
 	}
 	
 	
 	//Get location
 	//Get location
@@ -72,11 +74,14 @@
 				break;
 				break;
 			default:
 			default:
 				http_response_code(400);
 				http_response_code(400);
-			$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+				$error = $error . ERR_FORMAT . mysqli_real_escape_string($con, $_GET[GET_FORMAT]);
+				error_log($error);
+				exit(-2);
 		}
 		}
 	}
 	}
 	else{
 	else{
 		//No content
 		//No content
 		http_response_code(204);
 		http_response_code(204);
+		exit(0);
 	}
 	}
 ?>
 ?>