ACSD-64532: ENV variable set to “false” is treated as a string “false” instead of a BOOLEAN FALSE
The ACSD-64532 patch fixes the issue where the ENV
variable set to false is treated as a string false instead of a BOOLEAN
FALSE. This patch is available when the Quality Patches Tool (QPT) 1.1.62 is installed. The patch ID is ACSD-64532. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.8.
Affected products and versions
The patch is created for Adobe Commerce version:
Adobe Commerce (all deployment methods) 2.4.6-p8
Compatible with Adobe Commerce versions:
Adobe Commerce (all deployment methods) 2.4.6-p2 - 2.4.7-p4
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
ENV
variable set to false is treated as a string false instead of a BOOLEAN
FALSE.
Steps to reproduce:
-
Add
env:MAGENTO_DC_INDEXER__USE_APPLICATION_LOCK
with value false to environment variables on Adobe Commerce on cloud infrastructure. -
Wait for redeployment.
-
Run the script checking the value:
code language-php <?php require '../app/bootstrap.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $deploymentConfig = $objectManager->get('Magento\Framework\App\DeploymentConfig'); $useAppLock = $deploymentConfig->get('indexer/use_application_lock'); var_dump($useAppLock); $configParsedValue = $deploymentConfig->get('indexer/use_application_lock') ?: false; var_dump($configParsedValue);
Expected results:$configParsedValue
, which is the result of method isUseApplicationLock()
, must return a negative value in order to be correctly interpreted inside method \Magento\Indexer\Model\Mview\View\State::getStatus()
.
Actual results:$configParsedValue
has a value of string(5) false
.
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.