Passed
Push — master ( d38ff5...8d6740 )
by Joe
02:47
created
src/Mysqli/Db.php 3 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			if ($this->connectionAttempt > 1)
72 72
 				error_log("MySQLi Connection Attempt #{$this->connectionAttempt}/{$this->maxConnectErrors}");
73 73
 			if ($this->connectionAttempt >= $this->maxConnectErrors) {
74
-				$this->halt("connect($host, $user, \$password) failed. " . $mysqli->connect_error);
74
+				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
75 75
 				return 0;
76 76
 			}
77 77
 			//$this->linkId = new mysqli($host, $user, $password, $database);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			* }
88 88
 			*/
89 89
 			if ($this->linkId->connect_errno) {
90
-				$this->halt("connect($host, $user, \$password) failed. " . $mysqli->connect_error);
90
+				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
91 91
 				return 0;
92 92
 			}
93 93
 			/*if ($this->characterSet != '') {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 			$this->Errno = @mysqli_errno($this->linkId);
256 256
 			$this->Error = @mysqli_error($this->linkId);
257 257
 			if ($try == 1 && (null === $this->queryId || $this->queryId === FALSE)) {
258
-				$email = "MySQLi Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.$this->Errno.': '.$this->Error . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
258
+				$email = "MySQLi Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.$this->Errno.': '.$this->Error."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : '');
259 259
 				$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, TRUE);
260 260
 				$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, TRUE);
261 261
 				$subject = $_SERVER['HOSTNAME'].' MySQLi Error';
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 		if ($status) {
323 323
 			$this->Row = $pos;
324 324
 		} else {
325
-			$this->halt("seek($pos) failed: result has " . $this->num_rows().' rows');
325
+			$this->halt("seek($pos) failed: result has ".$this->num_rows().' rows');
326 326
 			/* half assed attempt to save the day,
327 327
 			* but do not consider this documented or even
328 328
 			* desirable behaviour.
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 */
381 381
 	public function getLastInsertId($table, $field) {
382 382
 		if (!isset($table) || $table == '' || !isset($field) || $field == '')
383
-			return - 1;
383
+			return -1;
384 384
 
385 385
 		return @mysqli_insert_id($this->linkId);
386 386
 	}
@@ -514,22 +514,22 @@  discard block
 block discarded – undo
514 514
  * @param int|string $field
515 515
  * @return bool
516 516
  */
517
-function mysqli_result($result, $row, $field=0) {
518
-	if ($result===false) return FALSE;
519
-	if ($row>=mysqli_num_rows($result)) return FALSE;
517
+function mysqli_result($result, $row, $field = 0) {
518
+	if ($result === false) return FALSE;
519
+	if ($row >= mysqli_num_rows($result)) return FALSE;
520 520
 	if (is_string($field) && !(mb_strpos($field, '.') === FALSE)) {
521
-		$tField=explode('.', $field);
522
-		$field=-1;
523
-		$tFields=mysqli_fetch_fields($result);
524
-		for ($id=0, $idMax = mysqli_num_fields($result);$id<$idMax;$id++) {
525
-			if ($tFields[$id]->table==$tField[0] && $tFields[$id]->name==$tField[1]) {
526
-				$field=$id;
521
+		$tField = explode('.', $field);
522
+		$field = -1;
523
+		$tFields = mysqli_fetch_fields($result);
524
+		for ($id = 0, $idMax = mysqli_num_fields($result); $id < $idMax; $id++) {
525
+			if ($tFields[$id]->table == $tField[0] && $tFields[$id]->name == $tField[1]) {
526
+				$field = $id;
527 527
 				break;
528 528
 			}
529 529
 		}
530
-		if ($field==-1) return FALSE;
530
+		if ($field == -1) return FALSE;
531 531
 	}
532 532
 	mysqli_data_seek($result, $row);
533
-	$line=mysqli_fetch_array($result);
534
-	return isset($line[$field])?$line[$field]:false;
533
+	$line = mysqli_fetch_array($result);
534
+	return isset($line[$field]) ? $line[$field] : false;
535 535
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
  *
18 18
  * @access public
19 19
  */
20
-class Db extends Generic implements Db_Interface
21
-{
20
+class Db extends Generic implements Db_Interface {
22 21
 	/**
23 22
 	 * @var string
24 23
 	 */
Please login to merge, or discard this patch.
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	public function queryReturn($query, $line = '', $file = '') {
171 171
 		$this->query($query, $line, $file);
172 172
 		if ($this->num_rows() == 0) {
173
-			return FALSE;
173
+			return false;
174 174
 		} elseif ($this->num_rows() == 1) {
175 175
 			$this->next_record(MYSQLI_ASSOC);
176 176
 			return $this->Record;
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
 			$this->free();
240 240
 		if ($this->Debug)
241 241
 			printf("Debug: query = %s<br>\n", $queryString);
242
-		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== FALSE)
242
+		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== false)
243 243
 			$this->log($queryString, $line, $file);
244 244
 		$tries = 3;
245 245
 		$try = 0;
246
-		$this->queryId = FALSE;
247
-		while ((null === $this->queryId || $this->queryId === FALSE) && $try <= $tries) {
246
+		$this->queryId = false;
247
+		while ((null === $this->queryId || $this->queryId === false) && $try <= $tries) {
248 248
 			$try++;
249 249
 			if ($try > 1) {
250 250
 				@mysqli_close($this->linkId);
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
 			$this->Row = 0;
255 255
 			$this->Errno = @mysqli_errno($this->linkId);
256 256
 			$this->Error = @mysqli_error($this->linkId);
257
-			if ($try == 1 && (null === $this->queryId || $this->queryId === FALSE)) {
257
+			if ($try == 1 && (null === $this->queryId || $this->queryId === false)) {
258 258
 				$email = "MySQLi Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.$this->Errno.': '.$this->Error . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
259
-				$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, TRUE);
260
-				$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, TRUE);
259
+				$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, true);
260
+				$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, true);
261 261
 				$subject = $_SERVER['HOSTNAME'].' MySQLi Error';
262 262
 				$headers = '';
263 263
 				$headers .= 'MIME-Version: 1.0'.PHP_EOL;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 			}
271 271
 		}
272 272
 		$this->haltOnError = $haltPrev;
273
-		if (null === $this->queryId || $this->queryId === FALSE)
273
+		if (null === $this->queryId || $this->queryId === false)
274 274
 			$this->halt('', $line, $file);
275 275
 
276 276
 		// Will return nada if it fails. That's fine.
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 	 * @return bool
295 295
 	 */
296 296
 	public function next_record($resultType = MYSQLI_BOTH) {
297
-		if ($this->queryId === FALSE) {
297
+		if ($this->queryId === false) {
298 298
 			$this->halt('next_record called with no query pending.');
299 299
 			return 0;
300 300
 		}
@@ -422,11 +422,11 @@  discard block
 block discarded – undo
422 422
 	 * @param bool $haltOnError optional, defaults to TRUE, whether or not to halt on error
423 423
 	 * @return bool|int|\mysqli_result
424 424
 	 */
425
-	public function unlock($haltOnError = TRUE) {
425
+	public function unlock($haltOnError = true) {
426 426
 		$this->connect();
427 427
 
428 428
 		$res = @mysqli_query($this->linkId, 'unlock tables');
429
-		if ($haltOnError === TRUE && !$res) {
429
+		if ($haltOnError === true && !$res) {
430 430
 			$this->halt('unlock() failed.');
431 431
 			return 0;
432 432
 		}
@@ -515,9 +515,9 @@  discard block
 block discarded – undo
515 515
  * @return bool
516 516
  */
517 517
 function mysqli_result($result, $row, $field=0) {
518
-	if ($result===false) return FALSE;
519
-	if ($row>=mysqli_num_rows($result)) return FALSE;
520
-	if (is_string($field) && !(mb_strpos($field, '.') === FALSE)) {
518
+	if ($result===false) return false;
519
+	if ($row>=mysqli_num_rows($result)) return false;
520
+	if (is_string($field) && !(mb_strpos($field, '.') === false)) {
521 521
 		$tField=explode('.', $field);
522 522
 		$field=-1;
523 523
 		$tFields=mysqli_fetch_fields($result);
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 				break;
528 528
 			}
529 529
 		}
530
-		if ($field==-1) return FALSE;
530
+		if ($field==-1) return false;
531 531
 	}
532 532
 	mysqli_data_seek($result, $row);
533 533
 	$line=mysqli_fetch_array($result);
Please login to merge, or discard this patch.
src/Db_Interface.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-	* Generic SQL Driver Related Functionality
4
-	* by [email protected]
5
-	* @copyright 2018
6
-	* @package MyAdmin
7
-	* @category SQL
8
-	*/
3
+ * Generic SQL Driver Related Functionality
4
+ * by [email protected]
5
+ * @copyright 2018
6
+ * @package MyAdmin
7
+ * @category SQL
8
+ */
9 9
 
10 10
 namespace MyDb;
11 11
 /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
  *
14 14
  * @package MyDb
15 15
  */
16
-interface Db_Interface
17
-{
16
+interface Db_Interface {
18 17
 
19 18
 	/**
20 19
 	 * Db_Interface constructor.
Please login to merge, or discard this patch.
src/Pdo/Db.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -198,18 +198,18 @@  discard block
 block discarded – undo
198 198
 		$this->queryId = $this->linkId->prepare($queryString);
199 199
 		$success = $this->queryId->execute();
200 200
 		$this->Rows = $this->queryId->fetchAll();
201
-		$this->log("PDO Query $queryString (S:$success) - " . count($this->Rows).' Rows', __LINE__, __FILE__);
201
+		$this->log("PDO Query $queryString (S:$success) - ".count($this->Rows).' Rows', __LINE__, __FILE__);
202 202
 		$this->Row = 0;
203 203
 		if ($success === FALSE) {
204
-			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($this->queryId->errorInfo(), TRUE) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
204
+			$email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($this->queryId->errorInfo(), TRUE)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : '');
205 205
 
206 206
 			$email .= '<br><br>Request Variables:<br>';
207 207
 			foreach ($_REQUEST as $key => $value)
208
-				$email .= $key.': '.$value . "<br>\n";
208
+				$email .= $key.': '.$value."<br>\n";
209 209
 
210 210
 			$email .= '<br><br>Server Variables:<br>';
211 211
 			foreach ($_SERVER as $key => $value)
212
-				$email .= $key.': '.$value . "<br>\n";
212
+				$email .= $key.': '.$value."<br>\n";
213 213
 			$subject = $_SERVER['HOSTNAME'].' MySQLi Error';
214 214
 			$headers = '';
215 215
 			$headers .= 'MIME-Version: 1.0'.PHP_EOL;
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		if (isset($this->Rows[$pos])) {
260 260
 			$this->Row = $pos;
261 261
 		} else {
262
-			$this->halt("seek($pos) failed: result has " . count($this->Rows).' rows');
262
+			$this->halt("seek($pos) failed: result has ".count($this->Rows).' rows');
263 263
 			/* half assed attempt to save the day,
264 264
 			* but do not consider this documented or even
265 265
 			* desirable behaviour.
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	public function getLastInsertId($table, $field) {
303 303
 		if (!isset($table) || $table == '' || !isset($field) || $field == '')
304
-			return - 1;
304
+			return -1;
305 305
 		return $this->linkId->lastInsertId();
306 306
 	}
307 307
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @access public
19 19
  */
20
-class Db extends Generic implements Db_Interface
21
-{
20
+class Db extends Generic implements Db_Interface {
22 21
 	/* public: connection parameters */
23 22
 	public $driver = 'mysql';
24 23
 	public $Rows = [];
@@ -76,11 +75,9 @@  discard block
 block discarded – undo
76 75
 		if ($this->characterSet != '')
77 76
 			$dSN .= ';charset='.$this->characterSet;
78 77
 		if ($this->linkId === FALSE) {
79
-			try
80
-			{
78
+			try {
81 79
 				$this->linkId = new \PDO($dSN, $user, $password);
82
-			}
83
-			catch (\PDOException $e) {
80
+			} catch (\PDOException $e) {
84 81
 				$this->halt('Connection Failed '.$e->getMessage());
85 82
 				return 0;
86 83
 			}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		$dSN = "$driver:dbname=$database;host=$host";
76 76
 		if ($this->characterSet != '')
77 77
 			$dSN .= ';charset='.$this->characterSet;
78
-		if ($this->linkId === FALSE) {
78
+		if ($this->linkId === false) {
79 79
 			try
80 80
 			{
81 81
 				$this->linkId = new \PDO($dSN, $user, $password);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	public function queryReturn($query, $line = '', $file = '') {
139 139
 		$this->query($query, $line, $file);
140 140
 		if ($this->num_rows() == 0) {
141
-			return FALSE;
141
+			return false;
142 142
 		} elseif ($this->num_rows() == 1) {
143 143
 			$this->next_record(MYSQL_ASSOC);
144 144
 			return $this->Record;
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
 			/* we already complained in connect() about that. */
188 188
 		}
189 189
 		// New query, discard previous result.
190
-		if ($this->queryId !== FALSE)
190
+		if ($this->queryId !== false)
191 191
 			$this->free();
192 192
 
193 193
 		if ($this->Debug)
194 194
 			printf("Debug: query = %s<br>\n", $queryString);
195
-		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== FALSE)
195
+		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== false)
196 196
 			$this->log($queryString, $line, $file);
197 197
 
198 198
 		$this->queryId = $this->linkId->prepare($queryString);
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
 		$this->Rows = $this->queryId->fetchAll();
201 201
 		$this->log("PDO Query $queryString (S:$success) - " . count($this->Rows).' Rows', __LINE__, __FILE__);
202 202
 		$this->Row = 0;
203
-		if ($success === FALSE) {
204
-			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($this->queryId->errorInfo(), TRUE) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
203
+		if ($success === false) {
204
+			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($this->queryId->errorInfo(), true) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
205 205
 
206 206
 			$email .= '<br><br>Request Variables:<br>';
207 207
 			foreach ($_REQUEST as $key => $value)
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 			$headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL;
217 217
 			$headers .= 'From: No-Reply <[email protected]>'.PHP_EOL;
218 218
 			$headers .= 'X-Mailer: Trouble-Free.Net Admin Center'.PHP_EOL;
219
-			admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl');
219
+			admin_mail($subject, $email, $headers, false, 'admin/sql_error.tpl');
220 220
 			$this->halt('Invalid SQL: '.$queryString, $line, $file);
221 221
 		}
222 222
 
Please login to merge, or discard this patch.
src/Generic.php 3 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 	public function limit($start = 0) {
165 165
 		echo '<b>Warning: limit() is no longer used, use limitQuery()</b>';
166 166
 		if ($start == 0) {
167
-			$s = 'limit '.(int)$this->maxMatches;
167
+			$s = 'limit '.(int) $this->maxMatches;
168 168
 		} else {
169
-			$s = 'limit '.(int)$start.','.(int)$this->maxMatches;
169
+			$s = 'limit '.(int) $start.','.(int) $this->maxMatches;
170 170
 		}
171 171
 		return $s;
172 172
 	}
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
 		if (!$numRows)
186 186
 			$numRows = $this->maxMatches;
187 187
 		if ($offset == 0) {
188
-			$queryString .= ' LIMIT '.(int)$numRows;
188
+			$queryString .= ' LIMIT '.(int) $numRows;
189 189
 		} else {
190
-			$queryString .= ' LIMIT '.(int)$offset.','.(int)$numRows;
190
+			$queryString .= ' LIMIT '.(int) $offset.','.(int) $numRows;
191 191
 		}
192 192
 
193 193
 		if ($this->Debug)
@@ -258,26 +258,26 @@  discard block
 block discarded – undo
258 258
 	 * @return mixed|void
259 259
 	 */
260 260
 	public function logBackTrace($msg, $line = '', $file = '') {
261
-		$backtrace=(function_exists('debug_backtrace') ? debug_backtrace() : []);
261
+		$backtrace = (function_exists('debug_backtrace') ? debug_backtrace() : []);
262 262
 		$this->log(
263 263
 			('' !== getenv('REQUEST_URI') ? ' '.getenv('REQUEST_URI') : '').
264 264
 			((isset($_POST) && count($_POST)) ? ' POST='.json_encode($_POST) : '').
265 265
 			((isset($_GET) && count($_GET)) ? ' GET='.json_encode($_GET) : '').
266 266
 			((isset($_FILES) && count($_FILES)) ? ' FILES='.json_encode($_FILES) : '').
267 267
 			('' !== getenv('HTTP_USER_AGENT') ? ' AGENT="'.getenv('HTTP_USER_AGENT').'"' : '').
268
-			(isset($_SERVER[ 'REQUEST_METHOD' ]) ?' METHOD="'. $_SERVER['REQUEST_METHOD']. '"'.
269
-				($_SERVER['REQUEST_METHOD'] === 'POST' ? ' POST="'. json_encode($_POST). '"' : '') : ''), $line, $file, 'error');
270
-		for($level=1, $levelMax = count($backtrace);$level < $levelMax;$level++) {
271
-			$message=(isset($backtrace[$level]['file']) ? 'File: '. $backtrace[$level]['file'] : '').
272
-				(isset($backtrace[$level]['line']) ? ' Line: '. $backtrace[$level]['line'] : '').
273
-				' Function: '.(isset($backtrace[$level] ['class']) ? '(class '. $backtrace[$level] ['class'].') ' : '') .
268
+			(isset($_SERVER['REQUEST_METHOD']) ? ' METHOD="'.$_SERVER['REQUEST_METHOD'].'"'.
269
+				($_SERVER['REQUEST_METHOD'] === 'POST' ? ' POST="'.json_encode($_POST).'"' : '') : ''), $line, $file, 'error');
270
+		for ($level = 1, $levelMax = count($backtrace); $level < $levelMax; $level++) {
271
+			$message = (isset($backtrace[$level]['file']) ? 'File: '.$backtrace[$level]['file'] : '').
272
+				(isset($backtrace[$level]['line']) ? ' Line: '.$backtrace[$level]['line'] : '').
273
+				' Function: '.(isset($backtrace[$level] ['class']) ? '(class '.$backtrace[$level] ['class'].') ' : '').
274 274
 				(isset($backtrace[$level] ['type']) ? $backtrace[$level] ['type'].' ' : '').
275 275
 				$backtrace[$level] ['function'].'(';
276
-			if(isset($backtrace[$level] ['args']))
277
-				for($argument = 0, $argumentMax = count($backtrace[$level]['args']); $argument < $argumentMax; $argument++)
276
+			if (isset($backtrace[$level] ['args']))
277
+				for ($argument = 0, $argumentMax = count($backtrace[$level]['args']); $argument < $argumentMax; $argument++)
278 278
 					$message .= ($argument > 0 ? ', ' : '').
279 279
 						(is_object($backtrace[$level]['args'][$argument]) ? 'class '.get_class($backtrace[$level]['args'][$argument]) : json_encode($backtrace[$level]['args'][$argument]));
280
-			$message.=')';
280
+			$message .= ')';
281 281
 			$this->log($message, $line, $file, 'error');
282 282
 		}
283 283
 	}
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 		$this->log("Database error: $msg", $line, $file, 'error');
293 293
 		if ($this->Errno != '0' || !in_array($this->Error, '', '()')) {
294 294
 			$sqlstate = mysqli_sqlstate($this->linkId);
295
-			$this->log("MySQLi SQLState: {$sqlstate}. Error: " . $this->Errno . ' (' . $this->Error . ')', $line, $file, 'error');
295
+			$this->log("MySQLi SQLState: {$sqlstate}. Error: ".$this->Errno.' ('.$this->Error.')', $line, $file, 'error');
296 296
 		}
297 297
 		$this->logBackTrace($msg, $line, $file);
298 298
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 /**
13 13
  * Class Generic
14 14
  */
15
-abstract class Generic
16
-{
15
+abstract class Generic {
17 16
 	/* public: connection parameters */
18 17
 	public $host = 'localhost';
19 18
 	public $database = '';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	public $password = '';
22 22
 
23 23
 	/* public: configuration parameters */
24
-	public $autoStripslashes = FALSE;
24
+	public $autoStripslashes = false;
25 25
 	public $Debug = 0; // Set to 1 for debugging messages.
26 26
 	public $haltOnError = 'yes'; // "yes" (halt with message), "no" (ignore errors quietly), "report" (ignore error, but spit a warning)
27 27
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			$time = $timestamp;
153 153
 		else {
154 154
 			$this->log('Cannot Match Timestamp from '.$timestamp, __LINE__, __FILE__);
155
-			$time = FALSE;
155
+			$time = false;
156 156
 		}
157 157
 		return $time;
158 158
 	}
Please login to merge, or discard this patch.
src/Mdb2/Db.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 	public function quote($text = '', $type = 'text') {
37 37
 		switch ($type) {
38 38
 			case 'text':
39
-				return "'" . mysqli_real_escape_string($this->linkId, $text) . "'";
39
+				return "'".mysqli_real_escape_string($this->linkId, $text)."'";
40 40
 				break;
41 41
 			case 'integer':
42
-				return (int)$text;
42
+				return (int) $text;
43 43
 				break;
44 44
 			default:
45 45
 				return $text;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			if ($this->connectionAttempt > 1)
139 139
 				error_log("MySQLi Connection Attempt #{$this->connectionAttempt}/{$this->maxConnectErrors}");
140 140
 			if ($this->connectionAttempt >= $this->maxConnectErrors) {
141
-				$this->halt("connect($host, $user, \$password) failed. " . $mysqli->connect_error);
141
+				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
142 142
 				return 0;
143 143
 			}
144 144
 			$this->linkId = mysqli_init();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 			$this->linkId->real_connect($host, $user, $password, $database);
147 147
 			$this->linkId->set_charset($this->characterSet);
148 148
 			if ($this->linkId->connect_errno) {
149
-				$this->halt("connect($host, $user, \$password) failed. " . $mysqli->connect_error);
149
+				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
150 150
 				return 0;
151 151
 			}
152 152
 		}
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
 		}
293 293
 		$this->haltOnError = $haltPrev;
294 294
 		if ($this->queryId === FALSE) {
295
-			$email = "MySQLi Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.$this->Errno.': '.$this->Error . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
296
-					'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
295
+			$email = "MySQLi Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.$this->Errno.': '.$this->Error."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ?
296
+					'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : '');
297 297
 
298 298
 			$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, TRUE);
299 299
 			$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, TRUE);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 		if ($status) {
349 349
 			$this->Row = $pos;
350 350
 		} else {
351
-			$this->halt("seek($pos) failed: result has " . $this->num_rows().' rows');
351
+			$this->halt("seek($pos) failed: result has ".$this->num_rows().' rows');
352 352
 			/* half assed attempt to save the day,
353 353
 			* but do not consider this documented or even
354 354
 			* desirable behaviour.
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 		*/
399 399
 
400 400
 		if (!isset($table) || $table == '' || !isset($field) || $field == '')
401
-			return - 1;
401
+			return -1;
402 402
 
403 403
 		return @mysqli_insert_id($this->linkId);
404 404
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
  *
18 18
  * @access public
19 19
  */
20
-class Db extends Generic implements Db_Interface
21
-{
20
+class Db extends Generic implements Db_Interface {
22 21
 	public $host = 'localhost';
23 22
 	public $user = 'pdns';
24 23
 	public $password = '';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	public $password = '';
25 25
 	public $database = 'pdns';
26 26
 	public $type = 'mdb2';
27
-	public $error = FALSE;
27
+	public $error = false;
28 28
 	public $message = '';
29 29
 
30 30
 	/**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	public function queryReturn($query, $line = '', $file = '') {
221 221
 		$this->query($query, $line, $file);
222 222
 		if ($this->num_rows() == 0) {
223
-			return FALSE;
223
+			return false;
224 224
 		} elseif ($this->num_rows() == 1) {
225 225
 			$this->next_record(MYSQL_ASSOC);
226 226
 			return $this->Record;
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 			$this->free();
276 276
 		if ($this->Debug)
277 277
 			printf("Debug: query = %s<br>\n", $queryString);
278
-		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== FALSE)
278
+		if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== false)
279 279
 			$this->log($queryString, $line, $file);
280 280
 		$tries = 3;
281 281
 		$try = 1;
@@ -283,27 +283,27 @@  discard block
 block discarded – undo
283 283
 		$this->Row = 0;
284 284
 		$this->Errno = @mysqli_errno($this->linkId);
285 285
 		$this->Error = @mysqli_error($this->linkId);
286
-		while ($this->queryId === FALSE && $try <= $tries) {
286
+		while ($this->queryId === false && $try <= $tries) {
287 287
 			$this->message = 'MySQL error '.@mysqli_errno($this->linkId).': '.@mysqli_error($this->linkId).' Query: '.$this->query;
288
-			$this->error = TRUE;
288
+			$this->error = true;
289 289
 			@mysqli_close($this->linkId);
290 290
 			$this->connect();
291 291
 			$try++;
292 292
 		}
293 293
 		$this->haltOnError = $haltPrev;
294
-		if ($this->queryId === FALSE) {
294
+		if ($this->queryId === false) {
295 295
 			$email = "MySQLi Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.$this->Errno.': '.$this->Error . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
296 296
 					'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
297 297
 
298
-			$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, TRUE);
299
-			$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, TRUE);
298
+			$email .= '<br><br>Request Variables:<br>'.print_r($_REQUEST, true);
299
+			$email .= '<br><br>Server Variables:<br>'.print_r($_SERVER, true);
300 300
 			$subject = $_SERVER['HOSTNAME'].' MySQLi Error';
301 301
 			$headers = '';
302 302
 			$headers .= 'MIME-Version: 1.0'.PHP_EOL;
303 303
 			$headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL;
304 304
 			$headers .= 'From: No-Reply <[email protected]>'.PHP_EOL;
305 305
 			$headers .= 'X-Mailer: Trouble-Free.Net Admin Center'.PHP_EOL;
306
-			admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl');
306
+			admin_mail($subject, $email, $headers, false, 'admin/sql_error.tpl');
307 307
 			$this->halt('Invalid SQL: '.$queryString, $line, $file);
308 308
 		}
309 309
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 * @return bool
321 321
 	 */
322 322
 	public function next_record($resultType = MYSQLI_BOTH) {
323
-		if ($this->queryId === FALSE) {
323
+		if ($this->queryId === false) {
324 324
 			$this->halt('next_record called with no query pending.');
325 325
 			return 0;
326 326
 		}
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 	 * @return bool
366 366
 	 */
367 367
 	public function transactionBegin() {
368
-		return TRUE;
368
+		return true;
369 369
 	}
370 370
 
371 371
 	/**
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 	 * @return bool
374 374
 	 */
375 375
 	public function transactionCommit() {
376
-		return TRUE;
376
+		return true;
377 377
 	}
378 378
 
379 379
 	/**
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	 * @return bool
382 382
 	 */
383 383
 	public function transactionAbort() {
384
-		return TRUE;
384
+		return true;
385 385
 	}
386 386
 
387 387
 	/**
Please login to merge, or discard this patch.
src/Loader.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
  *
14 14
  * @package MyDb
15 15
  */
16
-class Loader
17
-{
16
+class Loader {
18 17
 	/* public: connection parameters */
19 18
 	public $Type = 'mysqli';
20 19
 	public $host = 'localhost';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	public $password = '';
24 24
 
25 25
 	/* public: configuration parameters */
26
-	public $autoStripslashes = FALSE;
26
+	public $autoStripslashes = false;
27 27
 	public $Debug = 0; // Set to 1 for debugging messages.
28 28
 	public $haltOnError = 'yes'; // "yes" (halt with message), "no" (ignore errors quietly), "report" (ignore error, but spit a warning)
29 29
 
Please login to merge, or discard this patch.
src/Adodb/Db.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -177,16 +177,16 @@  discard block
 block discarded – undo
177 177
 			$this->queryId = $this->linkId->Execute($queryString);
178 178
 		}
179 179
 		catch (exception $e) {
180
-			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($e, TRUE) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
181
-					'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
180
+			$email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($e, TRUE)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ?
181
+					'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : '');
182 182
 
183 183
 			$email .= '<br><br>Request Variables:<br>';
184 184
 			foreach ($_REQUEST as $key => $value)
185
-				$email .= $key.': '.$value . "<br>\n";
185
+				$email .= $key.': '.$value."<br>\n";
186 186
 
187 187
 			$email .= '<br><br>Server Variables:<br>';
188 188
 			foreach ($_SERVER as $key => $value)
189
-				$email .= $key.': '.$value . "<br>\n";
189
+				$email .= $key.': '.$value."<br>\n";
190 190
 			$subject = $_SERVER['HOSTNAME'].' MySQLi Error';
191 191
 			$headers = '';
192 192
 			$headers .= 'MIME-Version: 1.0'.PHP_EOL;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl');
197 197
 			$this->halt('Invalid SQL: '.$queryString, $line, $file);
198 198
 		}
199
-		$this->log("ADOdb Query $queryString (S:$success) - " . count($this->Rows).' Rows', __LINE__, __FILE__);
199
+		$this->log("ADOdb Query $queryString (S:$success) - ".count($this->Rows).' Rows', __LINE__, __FILE__);
200 200
 		$this->Row = 0;
201 201
 
202 202
 		// Will return nada if it fails. That's fine.
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		if (isset($this->Rows[$pos])) {
233 233
 			$this->Row = $pos;
234 234
 		} else {
235
-			$this->halt("seek($pos) failed: result has " . count($this->Rows).' rows');
235
+			$this->halt("seek($pos) failed: result has ".count($this->Rows).' rows');
236 236
 			/* half assed attempt to save the day,
237 237
 			* but do not consider this documented or even
238 238
 			* desirable behaviour.
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	public function haltmsg($msg, $line = '', $file = '') {
375 375
 		$this->log("Database error: $msg", $line, $file, 'error');
376 376
 		if ($this->linkId->ErrorNo() != '0' && $this->linkId->ErrorMsg() != '')
377
-			$this->log('ADOdb SQL Error: ' . $this->linkId->ErrorMsg(), $line, $file, 'error');
377
+			$this->log('ADOdb SQL Error: '.$this->linkId->ErrorMsg(), $line, $file, 'error');
378 378
 		$this->logBackTrace($msg, $line, $file);
379 379
 	}
380 380
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @access public
19 19
  */
20
-class Db extends Generic implements Db_Interface
21
-{
20
+class Db extends Generic implements Db_Interface {
22 21
 	public $driver = 'mysql';
23 22
 	public $Rows = [];
24 23
 	public $type = 'adodb';
@@ -172,11 +171,9 @@  discard block
 block discarded – undo
172 171
 
173 172
 		}
174 173
 
175
-		try
176
-		{
174
+		try {
177 175
 			$this->queryId = $this->linkId->Execute($queryString);
178
-		}
179
-		catch (exception $e) {
176
+		} catch (exception $e) {
180 177
 			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($e, TRUE) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
181 178
 					'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
182 179
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		if ('' == $driver)
46 46
 			$driver = $this->driver;
47 47
 		/* establish connection, select database */
48
-		if ($this->linkId === FALSE) {
48
+		if ($this->linkId === false) {
49 49
 			$this->linkId = NewADOConnection($driver);
50 50
 			$this->linkId->Connect($host, $user, $password, $database);
51 51
 		}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	public function queryReturn($query, $line = '', $file = '') {
113 113
 		$this->query($query, $line, $file);
114 114
 		if ($this->num_rows() == 0) {
115
-			return FALSE;
115
+			return false;
116 116
 		} elseif ($this->num_rows() == 1) {
117 117
 			$this->next_record(MYSQL_ASSOC);
118 118
 			return $this->Record;
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
 		}
163 163
 
164 164
 		// New query, discard previous result.
165
-		if ($this->queryId !== FALSE)
165
+		if ($this->queryId !== false)
166 166
 			$this->free();
167 167
 
168 168
 		if ($this->Debug)
169 169
 			printf("Debug: query = %s<br>\n", $queryString);
170
-		if ($GLOBALS['log_queries'] !== FALSE) {
170
+		if ($GLOBALS['log_queries'] !== false) {
171 171
 			$this->log($queryString, $line, $file);
172 172
 
173 173
 		}
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			$this->queryId = $this->linkId->Execute($queryString);
178 178
 		}
179 179
 		catch (exception $e) {
180
-			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($e, TRUE) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
180
+			$email = "MySQL Error<br>\n".'Query: '.$queryString . "<br>\n".'Error #'.print_r($e, true) . "<br>\n".'Line: '.$line . "<br>\n".'File: '.$file . "<br>\n" . (isset($GLOBALS['tf']) ?
181 181
 					'User: '.$GLOBALS['tf']->session->account_id . "<br>\n" : '');
182 182
 
183 183
 			$email .= '<br><br>Request Variables:<br>';
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 			$headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL;
194 194
 			$headers .= 'From: No-Reply <[email protected]>'.PHP_EOL;
195 195
 			$headers .= 'X-Mailer: Trouble-Free.Net Admin Center'.PHP_EOL;
196
-			admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl');
196
+			admin_mail($subject, $email, $headers, false, 'admin/sql_error.tpl');
197 197
 			$this->halt('Invalid SQL: '.$queryString, $line, $file);
198 198
 		}
199 199
 		$this->log("ADOdb Query $queryString (S:$success) - " . count($this->Rows).' Rows', __LINE__, __FILE__);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * @return bool
248 248
 	 */
249 249
 	public function transactionBegin() {
250
-		return TRUE;
250
+		return true;
251 251
 	}
252 252
 
253 253
 	/**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @return bool
256 256
 	 */
257 257
 	public function transactionCommit() {
258
-		return TRUE;
258
+		return true;
259 259
 	}
260 260
 
261 261
 	/**
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 	 * @return bool
264 264
 	 */
265 265
 	public function transactionAbort() {
266
-		return TRUE;
266
+		return true;
267 267
 	}
268 268
 
269 269
 	/**
Please login to merge, or discard this patch.
src/Pgsql/Db.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function ifadd($add, $me) {
34 34
 		if ('' != $add)
35
-			return ' '.$me . $add;
35
+			return ' '.$me.$add;
36 36
 		return '';
37 37
 	}
38 38
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	public function connect() {
84 84
 		if (0 == $this->linkId) {
85
-			$connectString = 'dbname='.$this->database . $this->ifadd($this->host, 'host=') . $this->ifadd($this->port, 'port=') . $this->ifadd($this->user, 'user=') . $this->ifadd("'" . $this->password . "'", 'password=');
85
+			$connectString = 'dbname='.$this->database.$this->ifadd($this->host, 'host=').$this->ifadd($this->port, 'port=').$this->ifadd($this->user, 'user=').$this->ifadd("'".$this->password."'", 'password=');
86 86
 			$this->linkId = pg_pconnect($connectString);
87 87
 
88 88
 			if (!$this->linkId) {
@@ -262,21 +262,21 @@  discard block
 block discarded – undo
262 262
 		* conditional code to the apps.
263 263
 		*/
264 264
 		if (!isset($table) || $table == '' || !isset($field) || $field == '')
265
-			return - 1;
265
+			return -1;
266 266
 
267 267
 		$oid = pg_getlastoid($this->queryId);
268 268
 		if ($oid == -1)
269
-			return - 1;
269
+			return -1;
270 270
 
271 271
 		$result = @pg_exec($this->linkId, "select $field from $table where oid=$oid");
272 272
 		if (!$result)
273
-			return - 1;
273
+			return -1;
274 274
 
275 275
 		$Record = @pg_fetch_array($result, 0);
276 276
 		@pg_freeresult($result);
277 277
 		if (!is_array($Record)) /* OID not found? */
278 278
 		{
279
-			return - 1;
279
+			return -1;
280 280
 		}
281 281
 
282 282
 		return $Record[0];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
  *
18 18
  * @access public
19 19
  */
20
-class Db extends Generic implements Db_Interface
21
-{
20
+class Db extends Generic implements Db_Interface {
22 21
 	/* public: this is an api revision, not a CVS revision. */
23 22
 	public $type = 'pgsql';
24 23
 	public $port = '5432';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	public function queryReturn($query, $line = '', $file = '') {
116 116
 		$this->query($query, $line, $file);
117 117
 		if ($this->num_rows() == 0) {
118
-			return FALSE;
118
+			return false;
119 119
 		} elseif ($this->num_rows() == 1) {
120 120
 			$this->next_record(MYSQL_ASSOC);
121 121
 			return $this->Record;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		if (!$this->Errno) {
237 237
 			return pg_exec($this->linkId, 'commit');
238 238
 		} else {
239
-			return FALSE;
239
+			return false;
240 240
 		}
241 241
 	}
242 242
 
Please login to merge, or discard this patch.