Skip to content

Conversation

nikophil
Copy link
Contributor

In some cases when clearing the cache, I got this error:

TypeError {#7873
  #message: "array_keys(): Argument #1 ($array) must be of type array, bool given"
  #code: 0
  #file: "/app/vendor/jane-php/automapper-bundle/CacheWarmup/CacheWarmer.php"
  #line: 55
  trace: {
    /app/vendor/jane-php/automapper-bundle/CacheWarmup/CacheWarmer.php:55 { …}

so require_once returns a bool although the file do exist (there is a check just above) and I've check that even when the error occurs, the file's content is OK. So I concluded that the file has already been required (but I have to confess that I don't know why 🤷 ) and using require instead fixes the problem

check https://3v4l.org/5fadP#v8.2.7 => the second require_once returns true

Copy link
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks for the fix !

@Korbeil Korbeil merged commit 9a9c498 into janephp:next Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants