1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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.
This commit is contained in:
Nikita Popov
2024-03-17 22:27:09 +01:00
committed by GitHub
parent 47b6eabe37
commit 67184f5445
2 changed files with 2 additions and 5 deletions

View File

@@ -37,6 +37,7 @@ runs:
libxpm-dev \
libzip-dev \
libsqlite3-dev \
libsqlite3-mod-spatialite \
libwebp-dev \
libonig-dev \
libkrb5-dev \

View File

@@ -28,11 +28,7 @@ if (!$db instanceof PdoSqlite) {
echo "Wrong class type. Should be PdoSqlite but is " . get_class($db) . "\n";
}
$result = $db->loadExtension(getSpatialiteExtensionLocation(););
if ($result !== true) {
echo "Failed to load extension mod_spatialite.so";
exit(-1);
}
$db->loadExtension(getSpatialiteExtensionLocation());
$result = $db->query('SELECT AsText(Buffer(GeomFromText("LINESTRING(0 0, 1 0)"), 0.2)) as geometry_data;');