mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 03:11:12 +01:00
Add support for PHP 8 named arguments
This commit is contained in:
parent
21c6c5bb89
commit
4b3cbeabd4
@ -126,6 +126,9 @@ abstract class AbstractAPIFactory extends AsyncConstruct
|
||||
*/
|
||||
public function __call(string $name, array $arguments)
|
||||
{
|
||||
if ($arguments && !isset($arguments[0])) {
|
||||
$arguments = [$arguments];
|
||||
}
|
||||
$yielded = Tools::call($this->__call_async($name, $arguments));
|
||||
$async = !$this->lua && ((\is_array(\end($arguments)) ? \end($arguments) : [])['async'] ?? ($this->async && $name !== 'loop'));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user