mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
php8 visualconsoles review, warning! class and object missunderstanding here...
This commit is contained in:
parent
a58c6862e1
commit
7f574e1132
@ -132,6 +132,11 @@ if ($getVisualConsole === true) {
|
||||
$item = VisualConsole::getItemFromDB($itemId);
|
||||
} catch (Throwable $e) {
|
||||
// Bad params.
|
||||
echo $e->getMessage();
|
||||
if (__DEBUG === 1) {
|
||||
echo ' at '.$e->getFile().':'.$e->getLine();
|
||||
}
|
||||
|
||||
http_response_code(400);
|
||||
return;
|
||||
}
|
||||
@ -209,6 +214,11 @@ if ($getVisualConsole === true) {
|
||||
$item = VisualConsole::getItemFromDB($result);
|
||||
} catch (Throwable $e) {
|
||||
// Bad params.
|
||||
echo $e->getMessage();
|
||||
if (__DEBUG === 1) {
|
||||
echo ' at '.$e->getFile().':'.$e->getLine();
|
||||
}
|
||||
|
||||
http_response_code(400);
|
||||
return;
|
||||
}
|
||||
@ -247,7 +257,7 @@ if ($getVisualConsole === true) {
|
||||
}
|
||||
|
||||
$data = get_parameter('data');
|
||||
$result = $item::delete($itemId);
|
||||
$result = $item->delete($itemId);
|
||||
echo $result;
|
||||
return;
|
||||
} else if ($copyVisualConsoleItem === true) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user