jeckman / YouTube-Downloader

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers
GNU General Public License v2.0
895 stars 474 forks source link

Undefined variable: options in /var/www/html/yt/src/Http/CurlClient.php on line 126 #363

Closed lecoqlibre closed 5 years ago

lecoqlibre commented 5 years ago

Description

I got this error when trying to download a video from the UI interface (index.php) or from the getvideo script (target the getvideo.php script, passing in a videoID and preferred format).

Fatal error: Uncaught TypeError: Argument 2 passed to YoutubeDownloader\Http\CurlClient::createCurlOptions() must be of the type array, null given, called in /var/www/html/yt/src/Http/CurlClient.php on line 126 and defined in /var/www/html/yt/src/Http/CurlClient.php:145 Stack trace: #0 /var/www/html/yt/src/Http/CurlClient.php(126): YoutubeDownloader\Http\CurlClient->createCurlOptions(Object(YoutubeDownloader\Http\Request), NULL) #1 /var/www/html/yt/src/Http/CurlClient.php(110): YoutubeDownloader\Http\CurlClient->sendRequest(Object(YoutubeDownloader\Http\Request), Array) #2 /var/www/html/yt/src/Provider/Youtube/Provider.php(149): YoutubeDownloader\Http\CurlClient->send(Object(YoutubeDownloader\Http\Request), Array) #3 /var/www/html/yt/src/Application/ResultController.php(64): YoutubeDownloader\Provider\Youtube\Provider->provide('5FcaDVra-so') #4 /var/www/html/yt/src/Application/App.php(83): YoutubeDownloader\Application\ResultController->execute() #5 /var/www/html/yt/getvideo.php(23): YoutubeDownloader\Application\App->run in /var/www/html/yt/src/Http/CurlClient.php on line 145

Version

0.9

Additional Information

Debian 9 (4.9.0-7-amd64), Apache2, PHP Version 7.0.33-0+deb9u1

jeckman commented 5 years ago

@lecoqlibre Do you know what PHP version is running on the server?

lecoqlibre commented 5 years ago

@jeckman PHP Version 7.0.33-0+deb9u1

jeckman commented 5 years ago

I know some of the Curl Client stuff has been touched since then - can you pull Master, which has ~4 commits ahead of 0.9 release?

lecoqlibre commented 5 years ago

OK, did it, it works, thanks.

jeckman commented 5 years ago

@Art4 do you want to release a 0.9.1, or are you close to what we might call a 1.0?

Art4 commented 5 years ago

This is a duplication of #362. This bug is fixed already in master as @jeckman mentioned.

@Art4 do you want to release a 0.9.1, or are you close to what we might call a 1.0?

I think it is still a long way to 1.0, so I would rather release 0.10 with this bugfix and another change.

Art4 commented 5 years ago

I just released version 0.10.

dribgnikcom commented 5 years ago

Thanks for bringing back PHP5 compatibility in 0.10

Works great so far.