You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Config.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -101,10 +101,10 @@ public static function initialize(string $driver = '', array $arguments = null)
101
101
102
102
privatefunctionsetupMysqli($args)
103
103
{
104
-
if ( ! \function_exists('mysqli_connect') )
104
+
if ( ! \function_exists('mysqli_connect') )
105
105
thrownewException('<b>Fatal Error:</b> ez_mysql requires mySQLi Lib to be compiled and or linked in to the PHP engine');
106
106
107
-
if (\count($args)>=3) {
107
+
if (\count($args) >= 3) {
108
108
$this->setUser($args[0]);
109
109
$this->setPassword($args[1]);
110
110
$this->setName($args[2]);
@@ -118,9 +118,9 @@ private function setupMysqli($args)
118
118
119
119
privatefunctionsetupPdo($args)
120
120
{
121
-
if ( ! \class_exists('PDO') )
121
+
if ( ! \class_exists('PDO') )
122
122
thrownewException('<b>Fatal Error:</b> ez_pdo requires PDO Lib to be compiled and or linked in to the PHP engine');
123
-
if (\count($args)>=3) {
123
+
if (\count($args) >= 3) {
124
124
$this->setDsn($args[0]);
125
125
$this->setUser($args[1]);
126
126
$this->setPassword($args[2]);
@@ -132,10 +132,10 @@ private function setupPdo($args)
132
132
133
133
privatefunctionsetupSqlsrv($args)
134
134
{
135
-
if ( ! \function_exists('sqlsrv_connect') )
135
+
if ( ! \function_exists('sqlsrv_connect') )
136
136
thrownewException('<b>Fatal Error:</b> ez_sqlsrv requires the php_sqlsrv.dll or php_pdo_sqlsrv.dll to be installed. Also enable MS-SQL extension in PHP.ini file ');
137
137
138
-
if (\count($args)>=3) {
138
+
if (\count($args) >= 3) {
139
139
$this->setUser($args[0]);
140
140
$this->setPassword($args[1]);
141
141
$this->setName($args[2]);
@@ -147,10 +147,10 @@ private function setupSqlsrv($args)
147
147
148
148
privatefunctionsetupPgsql($args)
149
149
{
150
-
if ( ! \function_exists('pg_connect') )
150
+
if ( ! \function_exists('pg_connect') )
151
151
thrownewException('<b>Fatal Error:</b> ez_pgsql requires PostgreSQL Lib to be compiled and or linked in to the PHP engine');
152
152
153
-
if (count($args)>=3) {
153
+
if (count($args) >= 3) {
154
154
$this->setUser($args[0]);
155
155
$this->setPassword($args[1]);
156
156
$this->setName($args[2]);
@@ -161,10 +161,10 @@ private function setupPgsql($args)
161
161
}
162
162
163
163
privatefunctionsetupSqlite3($args) {
164
-
if ( ! \class_exists('SQLite3') )
164
+
if ( ! \class_exists('SQLite3') )
165
165
thrownewException('<b>Fatal Error:</b> ez_sqlite3 requires SQLite3 Lib to be compiled and or linked in to the PHP engine');
Copy file name to clipboardExpand all lines: lib/Constants.php
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@
13
13
// Error messages
14
14
\define('MISSING_CONFIGURATION', '<b>Fatal Error:</b> Missing configuration details to connect to database');
15
15
\define('CONFIGURATION_REQUIRES', '<b>Fatal Error:</b> This configuration requires ezsqlModel (ezsqlModel.php) to be included/loaded before it can be used');
16
+
\define('FAILED_CONNECTION', 'Failed to make connection to database');
0 commit comments