Skip to content

Commit

Permalink
Merge pull request #14455 from craftcms/bugfix/file_exists-deprecation
Browse files Browse the repository at this point in the history
Avoid file_exists deprecation warning
  • Loading branch information
brandonkelly authored Feb 26, 2024
2 parents 82df330 + 4e917b3 commit d5f311b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/services/Webpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [];
Expand Down

0 comments on commit d5f311b

Please sign in to comment.