mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #3577 from tersmitten/consistent-use-of-err-for-errors
Consistent use of `Shell::err` for errors
This commit is contained in:
commit
e5de1df165
1 changed files with 6 additions and 6 deletions
|
@ -127,7 +127,7 @@ class ExtractTask extends AppShell {
|
|||
);
|
||||
$response = $this->in($message, null, $defaultPath);
|
||||
if (strtoupper($response) === 'Q') {
|
||||
$this->out(__d('cake_console', 'Extract Aborted'));
|
||||
$this->err(__d('cake_console', 'Extract Aborted'));
|
||||
return $this->_stop();
|
||||
} elseif (strtoupper($response) === 'D' && count($this->_paths)) {
|
||||
$this->out();
|
||||
|
@ -204,7 +204,7 @@ class ExtractTask extends AppShell {
|
|||
while (true) {
|
||||
$response = $this->in($message, null, rtrim($this->_paths[0], DS) . DS . 'Locale');
|
||||
if (strtoupper($response) === 'Q') {
|
||||
$this->out(__d('cake_console', 'Extract Aborted'));
|
||||
$this->err(__d('cake_console', 'Extract Aborted'));
|
||||
return $this->_stop();
|
||||
} elseif ($this->_isPathUsable($response)) {
|
||||
$this->_output = $response . DS;
|
||||
|
@ -734,16 +734,16 @@ class ExtractTask extends AppShell {
|
|||
* @return void
|
||||
*/
|
||||
protected function _markerError($file, $line, $marker, $count) {
|
||||
$this->out(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
|
||||
$this->err(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
|
||||
$count += 2;
|
||||
$tokenCount = count($this->_tokens);
|
||||
$parenthesis = 1;
|
||||
|
||||
while ((($tokenCount - $count) > 0) && $parenthesis) {
|
||||
if (is_array($this->_tokens[$count])) {
|
||||
$this->out($this->_tokens[$count][1], false);
|
||||
$this->err($this->_tokens[$count][1], false);
|
||||
} else {
|
||||
$this->out($this->_tokens[$count], false);
|
||||
$this->err($this->_tokens[$count], false);
|
||||
if ($this->_tokens[$count] === '(') {
|
||||
$parenthesis++;
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ class ExtractTask extends AppShell {
|
|||
}
|
||||
$count++;
|
||||
}
|
||||
$this->out("\n", true);
|
||||
$this->err("\n", true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue