mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-05-20 08:31:06 +00:00
Update index.php
This commit is contained in:
parent
8c02b81c0a
commit
ff33dac5df
|
@ -9,7 +9,7 @@
|
||||||
* Updated at: 2024-06-21
|
* Updated at: 2024-06-21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define("PHP_HTTPPROXY_VERSION", "0.1.5.20");
|
define("PHP_HTTPPROXY_VERSION", "0.1.5.21");
|
||||||
define("DEFAULT_SOCKET_TIMEOUT", 1);
|
define("DEFAULT_SOCKET_TIMEOUT", 1);
|
||||||
define("STATEFUL_SOCKET_TIMEOUT", 30);
|
define("STATEFUL_SOCKET_TIMEOUT", 30);
|
||||||
define("MAX_EXECUTION_TIME", 0);
|
define("MAX_EXECUTION_TIME", 0);
|
||||||
|
@ -437,13 +437,18 @@ function relay_invoke_method($params) {
|
||||||
$args = (is_array($params['args']) ? $params['args'] : array());
|
$args = (is_array($params['args']) ? $params['args'] : array());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return array(
|
$data = call_user_func_array($callback, $args);
|
||||||
"success" => true,
|
if ($data == null) {
|
||||||
"result" => array(
|
exit(); // Call to `fatal_handler` is delayed compared to the return.
|
||||||
"status" => 200,
|
} else {
|
||||||
"data" => call_user_func_array($callback, $args)
|
return array(
|
||||||
)
|
"success" => true,
|
||||||
);
|
"result" => array(
|
||||||
|
"status" => 200,
|
||||||
|
"data" => $data
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return array(
|
return array(
|
||||||
"success" => false,
|
"success" => false,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user