diff --git a/langs/en.json b/langs/en.json index 46841a56f..7ba2aa0b3 100644 --- a/langs/en.json +++ b/langs/en.json @@ -124,6 +124,10 @@ "sec_peer_not_in_db": "This secret peer is not present in the internal peer database", "stream_handle_invalid": "An invalid stream handle was provided.", "length_too_big": "Length is too big", + "string_required": "A string was expected!", + "waveform_must_have_100_values": "A waveform array must have 100 values!", + "waveform_value": "A waveform value must be between 0 and 31!", + "could_not_convert_object": "Could not convert object of type %s", "type_extract_error_id": "Could not extract type: %s with id %s, you should update MadelineProto!", "constructor_not_found": "Constructor not found for type: ", "botapi_conversion_error": "Can't convert %s to a bot API object", diff --git a/src/Exception.php b/src/Exception.php index 14ff7e8d1..ec865ba79 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -126,10 +126,10 @@ class Exception extends \Exception $print(Lang::$current_lang['manualAdminActionRequired']); $print(Lang::$current_lang['manualAdminActionRequired']); $print(Lang::$current_lang['manualAdminActionRequired']); - $print(\sprintf(Lang::$current_lang['mmapError1'], $maps)); - $print(\sprintf(Lang::$current_lang['mmapError2'], 'echo 262144 | sudo tee /proc/sys/vm/max_map_count')); - $print(\sprintf(Lang::$current_lang['mmapError3'], 'echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf')); - $print(Lang::$current_lang['mmapError4']); + $print(\sprintf(Lang::$current_lang['mmapErrorPart1'], $maps)); + $print(\sprintf(Lang::$current_lang['mmapErrorPart2'], 'echo 262144 | sudo tee /proc/sys/vm/max_map_count')); + $print(\sprintf(Lang::$current_lang['mmapErrorPart3'], 'echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf')); + $print(Lang::$current_lang['mmapErrorPart4']); $print(Lang::$current_lang['manualAdminActionRequired']); $print(Lang::$current_lang['manualAdminActionRequired']); $print(Lang::$current_lang['manualAdminActionRequired']); diff --git a/src/TL/TL.php b/src/TL/TL.php index bbe02e38b..1b9f5fc56 100644 --- a/src/TL/TL.php +++ b/src/TL/TL.php @@ -620,7 +620,7 @@ final class TL implements TLInterface throw new Exception(Lang::$current_lang['array_invalid']); } if (isset($object['_'])) { - throw new Exception(\sprintf(Lang::$current_lang['arrayIsRequired'], $type['subtype'])); + throw new Exception(\sprintf(Lang::$current_lang['array_invalid'], $type['subtype'])); } $concat = $this->constructors->findByPredicate('vector')['id']; $concat .= Tools::packUnsignedInt(\count($object)); diff --git a/src/Tools.php b/src/Tools.php index e912bc3e3..3cc8a29f7 100644 --- a/src/Tools.php +++ b/src/Tools.php @@ -608,6 +608,7 @@ abstract class Tools extends AsyncTools 'mysql_connect' => 'https://github.com/amphp/mysql', 'fopen' => 'https://github.com/amphp/file', 'fsockopen' => 'https://github.com/amphp/socket', + 'pcntl_fork' => 'Tools::callFork', 'sleep' => '$this->sleep()', 'usleep' => '$this->sleep()', 'proc_open' => 'https://github.com/amphp/process',