Skip to content

Commit 0727801

Browse files
Grab wpdb instance from Complex Query class property.
Previously, we'd only load from the parameter. The `wpdb` parameter is nullable for Complex_Query, but not for Simple_Query, causing a fatal error if ommitted.
1 parent 1ff3676 commit 0727801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/Complex_Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct( Table $table, array $args = array(), \wpdb $wpdb =
7272

7373
$this->table = $table;
7474
$this->wpdb = $wpdb ?: $GLOBALS['wpdb'];
75-
$this->db_query = new Simple_Query( $wpdb, $table );
75+
$this->db_query = new Simple_Query( $this->wpdb, $table );
7676

7777
$this->args = wp_parse_args( $args, $this->get_default_args() );
7878

0 commit comments

Comments
 (0)