fix: use isset() when checking table property value (#52)

We can't access the `$this->table` property before initialization, so let's use `isset()` to check if the property has a value.

Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/52
This commit is contained in:
Victor Westerlund 2025-08-30 09:49:14 +02:00
parent 0e367f797f
commit 73297feb82

View file

@ -35,7 +35,7 @@
*/
private function throw_if_no_table() {
if (!$this->table) {
if (!isset($this->table)) {
throw new Exception("No table name defined");
}
}