Skip to content

Commit dd17877

Browse files
committed
[docs] Apply patch for #1206 to stables
1 parent 525680e commit dd17877

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Diff for: versioned_docs/version-4.1/apis/core/dml/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $DB->get_record_sql(
9595

9696
Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:
9797

98-
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
98+
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
9999
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
100100
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.
101101

@@ -648,7 +648,7 @@ try {
648648
// Assuming the both inserts work, we get to the following line.
649649
$transaction->allow_commit();
650650

651-
} catch(Exception $e) {
651+
} catch (Exception $e) {
652652
$transaction->rollback($e);
653653
}
654654
```
@@ -873,7 +873,7 @@ public function sql_compare_text(
873873

874874
```php title="Example"
875875
$comparedescription = $DB->sql_compare_text('description');
876-
$comparedescription = $DB->sql_compare_text(':description');
876+
$comparedescriptionplaceholder = $DB->sql_compare_text(':description');
877877
$todogroups = $DB->get_records_sql(
878878
"SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}",
879879
[

Diff for: versioned_docs/version-4.3/apis/core/dml/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $DB->get_record_sql(
9595

9696
Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:
9797

98-
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
98+
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
9999
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
100100
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.
101101

@@ -648,7 +648,7 @@ try {
648648
// Assuming the both inserts work, we get to the following line.
649649
$transaction->allow_commit();
650650

651-
} catch(Exception $e) {
651+
} catch (Exception $e) {
652652
$transaction->rollback($e);
653653
}
654654
```
@@ -873,7 +873,7 @@ public function sql_compare_text(
873873

874874
```php title="Example"
875875
$comparedescription = $DB->sql_compare_text('description');
876-
$comparedescription = $DB->sql_compare_text(':description');
876+
$comparedescriptionplaceholder = $DB->sql_compare_text(':description');
877877
$todogroups = $DB->get_records_sql(
878878
"SELECT id FROM {group} WHERE {$comparedescription} = {$comparedescriptionplaceholder}",
879879
[

Diff for: versioned_docs/version-4.4/apis/core/dml/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $DB->get_record_sql(
9595

9696
Some methods accept the <tt>$strictness</tt> parameter affecting the method behaviour. Supported modes are specified using the constants:
9797

98-
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception will be thrown if no record is found or multiple matching records are found.
98+
- <tt>MUST_EXIST</tt> - In this mode, the requested record must exist and must be unique. An exception `dml_missing_record_exception` will be thrown if no record is found or `dml_multiple_records_exception` if multiple matching records are found.
9999
- <tt>IGNORE_MISSING</tt> - In this mode, a missing record is not an error. False boolean is returned if the requested record is not found. If more records are found, a debugging message is displayed.
100100
- <tt>IGNORE_MULTIPLE</tt> - This is not a recommended mode. The function will silently ignore multiple records found and will return just the first one of them.
101101

@@ -648,7 +648,7 @@ try {
648648
// Assuming the both inserts work, we get to the following line.
649649
$transaction->allow_commit();
650650

651-
} catch(Exception $e) {
651+
} catch (Exception $e) {
652652
$transaction->rollback($e);
653653
}
654654
```

Diff for: versioned_docs/version-4.5/apis/core/dml/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ try {
648648
// Assuming the both inserts work, we get to the following line.
649649
$transaction->allow_commit();
650650

651-
} catch(Exception $e) {
651+
} catch (Exception $e) {
652652
$transaction->rollback($e);
653653
}
654654
```

0 commit comments

Comments
 (0)