We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in some edge cases where you check for a column and the column does not exists it returns an error:
Schema::hasColumn("carts", 'order_id');
ErrorException Attempt to read property "sql" on null at vendor/turso/libsql-laravel/src/Database/LibsqlSchemaBuilder.php:89 85▕ 86▕ $columns = $this->connection->selectOne("SELECT sql FROM sqlite_master WHERE type='table' AND name='{$table}'"); 87▕ 88▕ $pattern = '/(?:\(|,)\s*[\'"`]?([a-zA-Z_][a-zA-Z0-9_]*)[\'"`]?\s+[a-zA-Z]+/i'; ➜ 89▕ preg_match_all($pattern, $columns->sql, $matches); 90▕ $columnMatches = $matches[1] ?? []; 91▕ 92▕ $delctypes = stdClassToArray($data); 93▕ foreach ($delctypes as $key => $value) { +28 vendor frames 29 artisan:35 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
should check if is not null ??
if (!empty($columns->sql)) { ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in some edge cases where you check for a column and the column does not exists it returns an error:
should check if is not null ??
The text was updated successfully, but these errors were encountered: