Skip to content

Commit b7f7921

Browse files
committed
Fix typos
1 parent 69e1189 commit b7f7921

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/WP_SQLite_Driver_Tests.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11075,7 +11075,7 @@ public function testInsertErrors(): void {
1107511075
// Missing table.
1107611076
$this->assertQueryError(
1107711077
'INSERT INTO missing_table VALUES (1)',
11078-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exists"
11078+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exist"
1107911079
);
1108011080

1108111081
// Missing column.
@@ -11092,7 +11092,7 @@ public function testInsertErrorsInNonStrictMode(): void {
1109211092
// Missing table.
1109311093
$this->assertQueryError(
1109411094
'INSERT INTO missing_table VALUES (1)',
11095-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exists"
11095+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exist"
1109611096
);
1109711097

1109811098
// Missing column.
@@ -11108,7 +11108,7 @@ public function testUpdateErrors(): void {
1110811108
// Missing table.
1110911109
$this->assertQueryError(
1111011110
'UPDATE missing_table SET value = 1',
11111-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exists"
11111+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exist"
1111211112
);
1111311113

1111411114
// Missing column.
@@ -11125,7 +11125,7 @@ public function testUpdateErrorsInNonStrictMode(): void {
1112511125
// Missing table.
1112611126
$this->assertQueryError(
1112711127
'UPDATE missing_table SET value = 1',
11128-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exists"
11128+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'missing_table' doesn't exist"
1112911129
);
1113011130

1113111131
// Missing column.

wp-includes/sqlite-ast/class-wp-sqlite-driver.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,7 +4421,7 @@ private function translate_insert_or_replace_body(
44214421
if ( 0 === count( $columns ) ) {
44224422
throw $this->new_driver_exception(
44234423
sprintf(
4424-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s' doesn't exists",
4424+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s' doesn't exist",
44254425
$table_name
44264426
),
44274427
'42S02'
@@ -4454,12 +4454,12 @@ private function translate_insert_or_replace_body(
44544454
}
44554455

44564456
// Check if all listed columns exist.
4457-
$unkwnown_columns = array_diff( $insert_list, array_column( $columns, 'COLUMN_NAME' ) );
4458-
if ( count( $unkwnown_columns ) > 0 ) {
4457+
$unknown_columns = array_diff( $insert_list, array_column( $columns, 'COLUMN_NAME' ) );
4458+
if ( count( $unknown_columns ) > 0 ) {
44594459
throw $this->new_driver_exception(
44604460
sprintf(
44614461
"SQLSTATE[42S22]: Column not found: 1054 Unknown column '%s' in 'field list'",
4462-
$unkwnown_columns[0]
4462+
$unknown_columns[0]
44634463
),
44644464
'42S22'
44654465
);
@@ -4662,7 +4662,7 @@ private function translate_update_list( string $table_name, WP_Parser_Node $node
46624662
if ( 0 === count( $columns ) ) {
46634663
throw $this->new_driver_exception(
46644664
sprintf(
4665-
"SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s' doesn't exists",
4665+
"SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s' doesn't exist",
46664666
$table_name
46674667
),
46684668
'42S02'
@@ -5121,7 +5121,7 @@ private function cast_value_for_insert_or_update(
51215121
* Numeric types accept string notation in SQLite as well.
51225122
* 2. In non-strict mode, cast all values.
51235123
*
5124-
* TODO: While close to MySQL behavior, this does't exactly match
5124+
* TODO: While close to MySQL behavior, this doesn't exactly match
51255125
* all special cases. We may improve this further to accept
51265126
* BLOBs for numeric types, and other special behaviors.
51275127
*/

0 commit comments

Comments
 (0)