Code Duplication    Length = 8-12 lines in 2 locations

class/adodb.php 2 locations

@@ 899-906 (lines=8) @@
896
		$stmt = $this->Prepare($sql);
897
		$this->BeginTrans();
898
		$rs = $this->Execute($stmt, $inputarr);
899
		if (0 != $this->ErrorNo()) {
900
			// Log to error log file
901
			error_log('ErrorNo: ' . $this->ErrorNo()
902
				. "\nErrorMsg: " . $this->ErrorMsg()
903
				);
904
			$this->RollbackTrans();
905
			return -1;
906
		}
907
		$this->CommitTrans();
908
		return $rs;
909
	} // end of PExecute
@@ 1131-1142 (lines=12) @@
1128
				return -1;
1129
			}
1130
			// Any error ?
1131
			if (0 != $this->ErrorNo()) {
1132
				// Log to error log file
1133
				error_log('ErrorNo: ' . $this->ErrorNo()
1134
					. "\nErrorMsg: " . $this->ErrorMsg()
1135
					);
1136
				$this->RollbackTrans();
1137
				return -1;
1138
			}
1139
			else {
1140
				$this->CommitTrans();
1141
				return count($data);
1142
			}
1143
		}
1144
		else
1145
			return -1;