diff --git a/CHANGELOG.md b/CHANGELOG.md index 94bb1d67e4f..96c85209dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Composer installation commands suggested by the Plugin Store now include a minimum version constraint. - Fixed a bug where it wasn’t possible to eager-load Matrix block revisions, or load them via GraphQL. ([#14448](https://github.com/craftcms/cms/issues/14448)) +- Fixed a PHP warning that could occur when publishing asset bundles on Dev Mode. ([#14455](https://github.com/craftcms/cms/pull/14455)) ## 4.7.4 - 2024-02-22 diff --git a/src/services/Webpack.php b/src/services/Webpack.php index d4c91151e11..f22afad55b4 100644 --- a/src/services/Webpack.php +++ b/src/services/Webpack.php @@ -128,7 +128,7 @@ private function _getEnvVars(string $class): ?array $envFile = $this->_getEnvFilePath($class); // TODO: Use DotEnv::parse() when we version is bumped. - $fileContents = file_exists($envFile) ? @file_get_contents($envFile) : null; + $fileContents = $envFile && file_exists($envFile) ? @file_get_contents($envFile) : null; if (!$fileContents) { return $this->_envFileVariables[$class] = [];