Prequel icon indicating copy to clipboard operation
Prequel copied to clipboard

[BUG] Undefined variable $className causing dd() when visiting /prequel

Open caendesilva opened this issue 1 year ago • 4 comments

Describe the bug Just installed Prequel and went to /prequel, only to be greeted with this:

ErrorException {#559 ▼ // vendor/protoqol/prequel/src/Http/Middleware/Authorised.php:74
  #message: "Undefined variable $className"
  #code: 0
  #file: "
vendor/protoqol/prequel/
src/Connection/DatabaseConnector.php"
  #line: 32
  #severity: E_WARNING
  trace: {▶}
}

To Reproduce Steps to reproduce the behavior:

  1. Follow readme install instructions
  2. Visit /prequel

PHP Version

  • 8.3

Database type

  • Sqlite3

caendesilva avatar Jan 21 '24 12:01 caendesilva

Oh, I went further into the stacktrace and figured out that you don't support SQLite. https://github.com/Protoqol/Prequel/issues/46

Until that's supported, maybe throw a clearer exception?

caendesilva avatar Jan 21 '24 12:01 caendesilva

@caendesilva Thank you for submitting this issue, a clearer exception is certainly more useful. Will pick this up when I have time for Prequel.

QuintenJustus avatar Feb 06 '24 13:02 QuintenJustus

I have the same issue while using mysql

Update: I've figured out the issue. The problem occurs when the default database config has been renamed.

Solution: Default to mysql if the connection in use isn't part of the list.

PhillipMwaniki avatar Feb 21 '24 15:02 PhillipMwaniki

Update Here is a fix https://github.com/Protoqol/Prequel/pull/166

PhillipMwaniki avatar Feb 21 '24 16:02 PhillipMwaniki

Fixed by #166, update to 1.23.13

QuintenJustus avatar Mar 13 '24 11:03 QuintenJustus