Merge pull request #7961 from MrPetovan/bug/fatal-errors
Fix wrong type-hints for table parameter in Database->selectToArray and DBA::selectToArray
This commit is contained in:
commit
482af202f5
2 changed files with 9 additions and 9 deletions
|
@ -334,7 +334,7 @@ class DBA extends BaseObject
|
||||||
/**
|
/**
|
||||||
* @brief Delete a row from a table
|
* @brief Delete a row from a table
|
||||||
*
|
*
|
||||||
* @param string $table Table name
|
* @param string|array $table Table name
|
||||||
* @param array $conditions Field condition(s)
|
* @param array $conditions Field condition(s)
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* - cascade: If true we delete records in other tables that depend on the one we're deleting through
|
* - cascade: If true we delete records in other tables that depend on the one we're deleting through
|
||||||
|
@ -411,7 +411,7 @@ class DBA extends BaseObject
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see self::select
|
* @see self::select
|
||||||
*/
|
*/
|
||||||
public static function selectToArray(string $table, array $fields = [], array $condition = [], array $params = [])
|
public static function selectToArray($table, array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return self::getClass(Database::class)->selectToArray($table, $fields, $condition, $params);
|
return self::getClass(Database::class)->selectToArray($table, $fields, $condition, $params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1377,7 +1377,7 @@ class Database
|
||||||
*
|
*
|
||||||
* @brief Retrieve a single record from a table
|
* @brief Retrieve a single record from a table
|
||||||
*
|
*
|
||||||
* @param string $table
|
* @param string|array $table
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @param array $condition
|
* @param array $condition
|
||||||
* @param array $params
|
* @param array $params
|
||||||
|
@ -1412,7 +1412,7 @@ class Database
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
* @see self::select
|
* @see self::select
|
||||||
*/
|
*/
|
||||||
public function selectToArray(string $table, array $fields = [], array $condition = [], array $params = [])
|
public function selectToArray($table, array $fields = [], array $condition = [], array $params = [])
|
||||||
{
|
{
|
||||||
return $this->toArray($this->select($table, $fields, $condition, $params));
|
return $this->toArray($this->select($table, $fields, $condition, $params));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue