Fix disabling extensions with common substring

This commit is contained in:
Shivam Mathur 2023-05-24 23:01:34 +05:30
parent 48037d201f
commit c5fc0d8281
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -35,7 +35,7 @@ disable_extension_helper() {
disable_extension_dependents "$extension"
fi
sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "${ini_file[@]}" "$pecl_file"
sudo find "$ini_dir"/.. -name "*$extension.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true
sudo find "$ini_dir"/.. -name "*-$extension.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true
sudo rm -f /tmp/php"$version"_extensions
mkdir -p /tmp/extdisabled/"$version"
echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" >/dev/null 2>&1