Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit 29b4dc3

Browse files
committed
More Readline Fixes
1 parent d2c0415 commit 29b4dc3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

core/CLIOutput.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,19 @@ private function echo( string $s, ?string $color = null, int $ind = 0) : void {
123123

124124
public function readline(string $question, ?string $color = null, int $ind = 0) : string {
125125
if(Utilities::getOS() === Utilities::OS_TELEGRAM){
126+
self::$readlineCount++;
127+
if(self::$readlineCount > 50){
128+
die("Readline Count Error!");
129+
}
130+
126131
$r = Config::getStorageReader('telegram');
127132
if($r->isValue(['readline', $question])){
128133
$val = $r->getValue(['readline', $question]);
129134
return !is_string($val) ? "" : $val;
130135
}
131136
else{
132-
self::$readlineCount++;
137+
133138
file_put_contents(Config::getStorageDir() . '/notFoundReadlineKeys.log', json_encode($question) . PHP_EOL, FILE_APPEND);
134-
if(self::$readlineCount > 50){
135-
die("Readline Count Error!");
136-
}
137139
return "";
138140
}
139141
}

core/Utilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
class Utilities {
66

7-
const VERSION = 'v1.0.7';
7+
const VERSION = 'v1.0.8';
88

99
const DEFAULT_LINE_LENGTH = 125;
1010

0 commit comments

Comments
 (0)