uawdijnntqw1x1x1
IP : 216.73.216.103
Hostname : dsru51-17647.fornex.org
Kernel : Linux dsru51-17647.fornex.org 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
rustam
/
data
/
www
/
new.tedocolor.ru
/
wa-system
/
api
/
waAPIException.class.php
/
/
<?php class waAPIException extends Exception { public $response; protected $status_code; protected $error; protected $error_description; public function __construct($error, $error_description = null, $status_code = null, $response = array()) { if (empty($status_code) && is_numeric($error_description)) { $status_code = $error_description; $error_description = null; } $this->message = $this->error = $error; $this->code = $this->status_code = $status_code; $this->error_description = $error_description; $this->response = array('error' => $this->error) + $response; if ($this->error_description) { $this->response['error_description'] = $this->error_description; } if (defined('WA_API_EXCEPTION_STACK_TRACE') && WA_API_EXCEPTION_STACK_TRACE) { $this->response['trace'] = $this->getTraceAsString(); } } public function __toString() { if ($this->status_code) { wa()->getResponse()->setStatus($this->status_code); } $format = strtoupper(waRequest::request('format', 'JSON')); if ($format && !in_array($format, array("XML", "JSON"))) { $this->error = 'invalid_request'; $this->error_description = 'Invalid response format: '.$format; $format = 'JSON'; } if (!$format) { $format = 'JSON'; } $result = ''; if ($format == 'XML') { wa()->getResponse()->addHeader('Content-type', 'text/xml; charset=utf-8'); } elseif ($format == 'JSON') { $callback = (string)waRequest::get('callback', false); // for JSONP if ($callback) { wa()->getResponse()->setStatus(200); wa()->getResponse()->addHeader('Content-type', 'text/javascript; charset=utf-8'); $result .= $callback.'('; } else { wa()->getResponse()->addHeader('Content-type', 'application/json; charset=utf-8'); } } wa()->getResponse()->sendHeaders(); $result .= waAPIDecorator::factory($format)->decorate($this->response); if (!empty($callback)) { $result .= ');'; } return $result; } }
/var/www/rustam/data/www/new.tedocolor.ru/wa-system/api/waAPIException.class.php