Skip to content

Commit 11d59a0

Browse files
Merge pull request #338 from LibreSign/fix/file-get-contents-error
fix: file get contents error
2 parents 3e5dc02 + 5e25695 commit 11d59a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'production' => false,
1010
'matomo_container' => '8jNjdh8C_dev_dc9cf71ee2745d3690156798',
1111
'baseUrl' => '/',
12-
'accountUrl' => 'http://nginx',
12+
'accountUrl' => getenv('ACCOUNT_URL'),
1313
'form_url' => 'http://localhost/suitecrm-form-middleware/validate.php',
1414
'url_captcha' => 'http://localhost/suitecrm-form-middleware/captcha.php',
1515
'url_captcha_audio' => 'http://localhost/suitecrm-form-middleware/audio_captcha.php',
@@ -317,6 +317,9 @@
317317
return 'posts/' . $page->slug;
318318
},
319319
'items' => function ($post) {
320+
if(empty($post->get('accountUrl'))){
321+
return [];
322+
}
320323
$categories = json_decode(file_get_contents($post->get('accountUrl') . '/wp-json/wp/v2/categories'));
321324
$categories = array_filter($categories, fn ($c) => $c->slug === 'article');
322325
$posts = [];

0 commit comments

Comments
 (0)