Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHRAS-4045 Log - stdout - fix error on worker passed to igorw\get_in() #4496

Merged
merged 8 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/Alchemy/Phrasea/Core/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getConfig()
return $this->parser->parse($this->loadFile($this->config));
}

if (null !== $this->cache) {
if (null !== $this->cache && is_array($this->cache)) {
return $this->cache;
}

Expand All @@ -151,7 +151,13 @@ public function getConfig()
));
}

return $this->cache = require $this->compiled;
$this->cache = require $this->compiled;

if (is_array($this->cache)) {
return $this->cache;
} else {
throw new RuntimeException('Configuration compiled error');
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function setDefault($name)
*/
public function getConfig()
{
if (empty($this->cache)) {
if (empty($this->cache) || !is_array($this->cache)) {
throw new RuntimeException('Configuration is not set up.');
}

Expand Down
Loading