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:
1
.github/actions/apt-x64/action.yml
vendored
1
.github/actions/apt-x64/action.yml
vendored
@@ -37,6 +37,7 @@ runs:
|
||||
libxpm-dev \
|
||||
libzip-dev \
|
||||
libsqlite3-dev \
|
||||
libsqlite3-mod-spatialite \
|
||||
libwebp-dev \
|
||||
libonig-dev \
|
||||
libkrb5-dev \
|
||||
|
||||
@@ -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;');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user