summaryrefslogtreecommitdiffstats
path: root/lib/mysql.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mysql.php')
-rw-r--r--lib/mysql.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/mysql.php b/lib/mysql.php
index 088130f..08af607 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -46,7 +46,7 @@ namespace {
}
\Dshafik\MySQL::$last_connection = $conn;
$conn->hash = $hash;
- \Dshafik\MySQL::$connections[$hash] = ['refcount' => 1, 'conn' => $conn];
+ \Dshafik\MySQL::$connections[$hash] = array('refcount' => 1, 'conn' => $conn);
return $conn;
}
@@ -74,7 +74,7 @@ namespace {
// @codeCoverageIgnoreEnd
$conn->hash = $hash;
- \Dshafik\MySQL::$connections[$hash] = ['refcount' => 1, 'conn' => $conn];
+ \Dshafik\MySQL::$connections[$hash] = array('refcount' => 1, 'conn' => $conn);
return $conn;
} catch (\Throwable $e) {
@@ -334,7 +334,7 @@ namespace {
return mysqli_fetch_assoc($result) ?: false;
}
- function mysql_fetch_object($result, $class = null, array $params = []) /* : object|null */
+ function mysql_fetch_object($result, $class = null, array $params = array()) /* : object|null */
{
if (\Dshafik\MySQL::checkValidResult($result, __FUNCTION__)) {
// @codeCoverageIgnoreStart
@@ -625,7 +625,7 @@ namespace Dshafik {
class MySQL
{
public static $last_connection = null;
- public static $connections = [];
+ public static $connections = array();
public static function getConnection($link = null, $func = null)
{
@@ -718,7 +718,7 @@ namespace Dshafik {
protected static function getFieldFlags($what)
{
// Order of flags taken from http://lxr.php.net/xref/PHP_5_6/ext/mysql/php_mysql.c#2507
- $flags = [
+ $flags = array(
MYSQLI_NOT_NULL_FLAG => "not_null",
MYSQLI_PRI_KEY_FLAG => "primary_key",
MYSQLI_UNIQUE_KEY_FLAG => "unique_key",
@@ -731,9 +731,9 @@ namespace Dshafik {
MYSQLI_SET_FLAG => "set",
MYSQLI_AUTO_INCREMENT_FLAG => "auto_increment",
MYSQLI_TIMESTAMP_FLAG => "timestamp",
- ];
+ );
- $fieldFlags = [];
+ $fieldFlags = array();
foreach ($flags as $flag => $value) {
if ($what & $flag) {
$fieldFlags[] = $value;
@@ -745,7 +745,7 @@ namespace Dshafik {
protected static function getFieldType($what)
{
- $types = [
+ $types = array(
MYSQLI_TYPE_STRING => 'string',
MYSQLI_TYPE_VAR_STRING => 'string',
MYSQLI_TYPE_ENUM => 'string',
@@ -778,7 +778,7 @@ namespace Dshafik {
MYSQLI_TYPE_NULL => 'null',
MYSQLI_TYPE_GEOMETRY => 'geometry',
- ];
+ );
return isset($types[$what]) ? $types[$what] : "unknown";
}