Code Duplication    Length = 8-12 lines in 2 locations

class/adodb.php 2 locations

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