Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 808fd747fe | |||
| 70701bb8f1 |
@ -272,8 +272,11 @@ class APIlite
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseReturnDoc(string $doc): string|null
|
private function parseReturnDoc(?string $doc): string|null
|
||||||
{
|
{
|
||||||
|
if (is_null($doc) || $doc === '') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$lines = explode("\n", $doc);
|
$lines = explode("\n", $doc);
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
if (strpos($line, '@return') !== false) {
|
if (strpos($line, '@return') !== false) {
|
||||||
@ -293,7 +296,7 @@ class APIlite
|
|||||||
header('Access-Control-Allow-Origin: ' . $origin);
|
header('Access-Control-Allow-Origin: ' . $origin);
|
||||||
header('Access-Control-Allow-Credentials: true');
|
header('Access-Control-Allow-Credentials: true');
|
||||||
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
||||||
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept');
|
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, Authorization');
|
||||||
echo json_encode($arr);
|
echo json_encode($arr);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user