From f00cd63df89bc8abad81a610089f3792ee7c37c9 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 24 Mar 2018 13:48:27 +0100 Subject: [PATCH] Fixes to docs --- docs/docs/USING_METHODS.md | 11 +++++++---- src/danog/MadelineProto/Logger.php | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/docs/USING_METHODS.md b/docs/docs/USING_METHODS.md index 4520c633..69e3240e 100644 --- a/docs/docs/USING_METHODS.md +++ b/docs/docs/USING_METHODS.md @@ -62,9 +62,12 @@ $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => '< reply_markup accepts bot API reply markup objects as well as MTProto ones. ```php -$bot_API_markup = ['inline_keyboard' => [ - ['text' => 'MadelineProto docs', 'url' => 'https://docs.madelineproto.xyz'], - ['text' => 'MadelineProto channel', 'url' => 'https://t.me/MadelineProto'] +$bot_API_markup = ['inline_keyboard' => + [ + [ + ['text' => 'MadelineProto docs', 'url' => 'https://docs.madelineproto.xyz'], + ['text' => 'MadelineProto channel', 'url' => 'https://t.me/MadelineProto'] + ] ] ]; $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'lel', 'reply_markup' => $bot_API_markup]); @@ -98,4 +101,4 @@ $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => 'l If the queue if the specified queue name does not exist, it will be created. -
\ No newline at end of file +
diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index 0a032a00..31cdc1ad 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -129,12 +129,12 @@ class Logger $prefix .= ' (p)'; } if (!is_string($param)) { - $parame = json_encode($param, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); - if ($parame == '') { + $param = json_encode($param, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); + /*if ($parame == '') { $param = var_export($param, true); } else { $param = $parame; - } + }*/ } $param = str_pad(basename(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file'], '.php').$prefix.': ', 16 + strlen($prefix))."\t".$param; /*if (self::$isatty) {