Code Duplication    Length = 20-20 lines in 2 locations

includes/db/DatabaseOracle.php 2 locations

@@ 683-702 (lines=20) @@
680
681
					return false;
682
				}
683
			} else {
684
				/** @var OCI_Lob[] $lob */
685
				$lob[$col] = oci_new_descriptor( $this->mConn, OCI_D_LOB );
686
				if ( $lob[$col] === false ) {
687
					$e = oci_error( $stmt );
688
					throw new DBUnexpectedError( $this, "Cannot create LOB descriptor: " . $e['message'] );
689
				}
690
691
				if ( is_object( $val ) ) {
692
					$val = $val->fetch();
693
				}
694
695
				if ( $col_type == 'BLOB' ) {
696
					$lob[$col]->writeTemporary( $val, OCI_TEMP_BLOB );
697
					oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_BLOB );
698
				} else {
699
					$lob[$col]->writeTemporary( $val, OCI_TEMP_CLOB );
700
					oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_CLOB );
701
				}
702
			}
703
		}
704
705
		MediaWiki\suppressWarnings();
@@ 1484-1503 (lines=20) @@
1481
1482
					return false;
1483
				}
1484
			} else {
1485
				/** @var OCI_Lob[] $lob */
1486
				$lob[$col] = oci_new_descriptor( $this->mConn, OCI_D_LOB );
1487
				if ( $lob[$col] === false ) {
1488
					$e = oci_error( $stmt );
1489
					throw new DBUnexpectedError( $this, "Cannot create LOB descriptor: " . $e['message'] );
1490
				}
1491
1492
				if ( is_object( $val ) ) {
1493
					$val = $val->getData();
1494
				}
1495
1496
				if ( $col_type == 'BLOB' ) {
1497
					$lob[$col]->writeTemporary( $val );
1498
					oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, SQLT_BLOB );
1499
				} else {
1500
					$lob[$col]->writeTemporary( $val );
1501
					oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, OCI_B_CLOB );
1502
				}
1503
			}
1504
		}
1505
1506
		MediaWiki\suppressWarnings();