Skip to content

Commit

Permalink
$data variable should be array
Browse files Browse the repository at this point in the history
in some analysis, I was receiving this error "Uncaught TypeError: vsprintf(): Argument squizlabs#2 ($values) must be of type array, string given" on line 1056
  • Loading branch information
juanpgarciac committed Jan 8, 2023
1 parent add95a7 commit fb021b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Files/File.php
Expand Up @@ -1053,7 +1053,7 @@ protected function addMessage($error, $message, $line, $column, $code, $data, $s
}

if (empty($data) === false) {
$message = vsprintf($message, $data);
$message = vsprintf($message, is_array($data) ? $data : [$data] );
}

if (isset($messages[$line]) === false) {
Expand Down

0 comments on commit fb021b5

Please sign in to comment.