Skip to content

Commit 67184f5

Browse files
authored
Fix PdoSqlite::loadExtension() test (#13736)
The test contained a syntax error and an incorrect use of loadExtension(), which returns void not bool. Also install the necessary package in CI, so it gets tested there.
1 parent 47b6eab commit 67184f5

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.github/actions/apt-x64/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ runs:
3737
libxpm-dev \
3838
libzip-dev \
3939
libsqlite3-dev \
40+
libsqlite3-mod-spatialite \
4041
libwebp-dev \
4142
libonig-dev \
4243
libkrb5-dev \

ext/pdo_sqlite/tests/subclasses/pdosqlite_003.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ if (!$db instanceof PdoSqlite) {
2828
echo "Wrong class type. Should be PdoSqlite but is " . get_class($db) . "\n";
2929
}
3030

31-
$result = $db->loadExtension(getSpatialiteExtensionLocation(););
32-
if ($result !== true) {
33-
echo "Failed to load extension mod_spatialite.so";
34-
exit(-1);
35-
}
31+
$db->loadExtension(getSpatialiteExtensionLocation());
3632

3733
$result = $db->query('SELECT AsText(Buffer(GeomFromText("LINESTRING(0 0, 1 0)"), 0.2)) as geometry_data;');
3834

0 commit comments

Comments
 (0)