datto / php-json-rpc

Fully unit-tested JSON-RPC 2.0 for PHP
GNU Lesser General Public License v3.0
185 stars 39 forks source link

Proper error checking instead of @ #5

Closed emente closed 7 years ago

emente commented 7 years ago

Server.php/147:

        $version = @$request['jsonrpc'];
        if (@$version !== self::VERSION) {
        $method = @$request['method'];

Because on most dev servers it results in the following:

SCREAM: Error suppression ignored for Notice: Undefined index: jsonrpc in /var/www/foo/vendor/datto/json-rpc/src/Server.php on line 147

smortensen commented 7 years ago

Okay, I've released version 4.0.3, which eliminates the error suppression. Does this work for you?

mar-tin-f commented 7 years ago

Yes, works. Perfect. Thank you.