Error in BotManager.php line 65 unexpected '?'
Django1982 opened this issue · 1 comments
Django1982 commented
Hi there,
i'm trying to user ure php telegram bot and i got this error code in my apache log file:
[Thu Feb 08 13:39:39.778757 2018] [:error] [pid 31072] [client 149.154.167.229:42151] PHP Parse error: syntax error, unexpected '?' in /vendor/php-telegram-bot/telegram-bot-manager/src/BotManager.php on line 65
I am using this PHP 7.0.27-0+deb9u1
This is the function what my apache/php is curious about (marked it with double **):
public function __construct(array $params)
{
// Initialise logging before anything else, to allow errors to be logged.
**$this->initLogging($params['logging'] ?? []);**
$this->params = new Params($params);
$this->action = new Action($this->params->getScriptParam('a'));
// Set up a new Telegram instance.
$this->telegram = new Telegram(
$this->params->getBotParam('api_key'),
$this->params->getBotParam('bot_username')
);
}
What can i do to avoid this error?
Thanks for your help in advance!
Django1982 commented
Wrong Project -> moved to Telegram-Bot-Manager Project and closed here....