Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.96k stars 582 forks source link

Call to undefined function Alltube\_() #286

Closed ivanioannovich closed 4 years ago

ivanioannovich commented 4 years ago

I try download Youtube video, but error:

Fatal error: Uncaught Error: Call to undefined function Alltube_() in /vendor/rudloff/alltube/classes/Config.php:158 Stack trace:

0 /vendor/rudloff/alltube/classes/Config.php(257): Alltube\Config->__construct()

1 /vendor/rudloff/alltube/classes/Config.php(288): Alltube\Config::getInstance()

2 /alltube_getURL.php(14): Alltube\Config::setOptions(Array)

3 {main}

thrown in /vendor/rudloff/alltube/classes/Config.php on line 158

Try "php composer.phar update" and nothing.

Rudloff commented 4 years ago

Please don't remove the issue template.

What version of Alltube are you using? I don't think we use _() anymore.

ivanioannovich commented 4 years ago
    if (empty($this->genericFormats)) {
        // We don't put this in the class definition so it can be detected by xgettext.
        $this->genericFormats = [
            'best'                => _('Best'),
            'bestvideo+bestaudio' => _('Remux best video with best audio'),
            'worst'               => _('Worst'),
        ];
    }
Rudloff commented 4 years ago

You are clearly not using the latest version since this was removed in https://github.com/Rudloff/alltube/commit/cc55fabe14f62cb297c3740831ea7d1a796873b1.

Anyway, the _() function is an alias for gettext() so you need to install the gettext extension.