With the current solution I get this error when I passing in null:
TypeError: Argument 4 passed to Yajra\Pdo\Oci8::query() must be of the type array, null given,
Code snippet of problem
$con->query('SELECT table_name FROM user_tables', null, null, null);
Solution
Match the docblock that tells it can be array|null
Also see setFetchMode.
/**
* Executes an SQL statement, returning the results as a
* Yajra\Pdo\Oci8\Statement object.
*
* @param string $statement The SQL statement to prepare and execute.
* @param int|null $fetchMode The fetch mode must be one of the
* PDO::FETCH_* constants.
* @param mixed|null $modeArg Column number, class name or object.
* @param array|null $ctorArgs Constructor arguments.
* @return Statement
*/
public function query($statement, $fetchMode = null, $modeArg = null, $ctorArgs = null)
Summary of problem or feature request
pdo->query has multiple implementations. But the 4th parameter can be null. See https://www.php.net/manual/en/pdo.query.php
With the current solution I get this error when I passing in null:
TypeError: Argument 4 passed to Yajra\Pdo\Oci8::query() must be of the type array, null given,
Code snippet of problem
Solution
Match the docblock that tells it can be array|null Also see setFetchMode.