tinkerwell-helper
tinkerwell-helper copied to clipboard
Undefined variable $output
Steps to Reproduce:
use App\Models\User;
User::first();
An run the code above.
It Returns:
$array = [
'Error' => '
ErrorException
Undefined variable $output
at phar:///Applications/Tinkerwell.app/Contents/Resources/tinkerwell/tinker.phar/src/Actions/TableAction.php:38
34▕ $values = \_PhpScoperc223a629f245\Tinkerwell\Shell\CustomExecutionLoopClosure::getLastReturnValue();
35▕ if (\is_iterable($values)) {
36▕ return $this->outputTable($values);
37▕ }
➜ 38▕ $outputCode = $output->fetch();
39▕ $outputCode = \preg_replace('/phar:\\/\\/(.*)\\n?/m', '', $outputCode);
40▕ echo \json_encode(['error' => \trim($outputCode), 'keys' => [], 'data' => []]);
41▕ }
42▕ protected function outputTable($values)
1 phar:///Applications/Tinkerwell.app/Contents/Resources/tinkerwell/tinker.phar/src/Actions/TableAction.php:38
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined variable $output", "phar:///Applications/Tinkerwell.app/Contents/Resources/tinkerwell/tinker.phar/src/Actions/TableAction.php")
2 phar:///Applications/Tinkerwell.app/Contents/Resources/tinkerwell/tinker.phar/src/ActionInvoker.php:19
_PhpScoperc223a629f245\Tinkerwell\Actions\TableAction::execute()
',
];
Same here:
$array = [
'Error' => '
ErrorException
Undefined variable $output
at phar:///tmp/.mount_TinkeryANIQK/resources/tinkerwell/tinker.phar/src/Actions/TableAction.php:38
34▕ $values = \_PhpScoperc223a629f245\Tinkerwell\Shell\CustomExecutionLoopClosure::getLastReturnValue();
35▕ if (\is_iterable($values)) {
36▕ return $this->outputTable($values);
37▕ }
➜ 38▕ $outputCode = $output->fetch();
39▕ $outputCode = \preg_replace('/phar:\\/\\/(.*)\\n?/m', '', $outputCode);
40▕ echo \json_encode(['error' => \trim($outputCode), 'keys' => [], 'data' => []]);
41▕ }
42▕ protected function outputTable($values)
1 phar:///tmp/.mount_TinkeryANIQK/resources/tinkerwell/tinker.phar/src/Actions/TableAction.php:38
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}()
2 phar:///tmp/.mount_TinkeryANIQK/resources/tinkerwell/tinker.phar/src/ActionInvoker.php:19
_PhpScoperc223a629f245\Tinkerwell\Actions\TableAction::execute()
',
];
Have you found a solution to the problem? I get this error after migrating to a new Mac with Apple Silicon and installing the app for apple silicon again.
edit Deleting the application with AppCleaner (which finds all files a program installs on macOS) and reinstalling it solved the issue.