Minor fix (notice)

Update composer.json
This commit is contained in:
alphayax 2016-06-18 20:25:49 +02:00
parent 59d4316ec9
commit 1ac9811d6e
3 changed files with 7 additions and 5 deletions

View File

@ -12,7 +12,8 @@
],
"require" : {
"php": ">=5.5.0",
"alphayax/php_utils" : "^1.0.2",
"ext-curl": "*",
"alphayax/php_utils" : "^1.2.0",
"monolog/monolog": "^1.9.1"
},
"require-dev" : {

View File

@ -1,5 +1,5 @@
{
"rss": "https:\/\/www.nyaa.se\/?page=rss&user=175467",
"pattern": "\/One_Piece.*HD.*mp4\/",
"last_date": 1465246874
"last_date": 1465755839
}

View File

@ -66,11 +66,11 @@ class RestAuth extends Rest {
*/
protected function checkResponse(){
$response = $this->getCurlResponse();
echo ">> ". explode( "\r\n", $this->_curl_getinfo['request_header'])[0] . PHP_EOL;
$request = explode( "\r\n", $this->curlGetInfo['request_header'])[0] . PHP_EOL;
// echo ">> $request";
if( false === $this->getSuccess()){
$request = explode( PHP_EOL, @$this->_curl_getinfo['request_header'])[0];
/*
switch( $response['error_code']){
case 'invalid_request' :
$a = new alphayax\freebox\Exception\InvalidRequestException();
@ -81,6 +81,7 @@ class RestAuth extends Rest {
echo PHP_EOL . '---' . PHP_EOL;
throw $a;
}
*/
throw new \Exception( $request .' - '. $response['msg'] . ' ('. $response['error_code'] . ')');
}
}