fix: Argument #2 () cannot be null

master
Guillermo Pages 4 years ago
parent 145a3e83d4
commit 68bfb7fdbb

997
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,7 @@
<?php <?php
namespace Bsr\Webservice; namespace Bsr\Webservice;
use Bsr\Webservice\Exception\BugException;
use Bsr\Webservice\Exception\WebException; use Bsr\Webservice\Exception\WebException;
use Bsr\Webservice\Formatter\Html; use Bsr\Webservice\Formatter\Html;
@ -16,7 +17,7 @@ class Help
* @param mixed $ws * @param mixed $ws
* @param sting $func the function to be presented * @param sting $func the function to be presented
*/ */
private static function func($ws, $func) private static function func($ws, string $func)
{ {
try { try {
$rm = new \ReflectionMethod($ws, $func); $rm = new \ReflectionMethod($ws, $func);

@ -51,7 +51,9 @@ abstract class WebService
$data["error"]["reason"] = $e->getMessage(); $data["error"]["reason"] = $e->getMessage();
$data["error"]["name"] = $e->getName(); $data["error"]["name"] = $e->getName();
if ($this->func !== null) {
$data['extra'] = Help::exception($e, $this, $this->func); $data['extra'] = Help::exception($e, $this, $this->func);
}
$this->status = 400; $this->status = 400;

Loading…
Cancel
Save