Skip to content

Commit adbfee3

Browse files
nordlolektvdijen
authored andcommitted
Additional check if key UIInfo exists added (#8)
1 parent ac39fbd commit adbfee3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

www/getconsent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@
160160
$t->data['dstName'] = $dstName;
161161

162162
// Fetch privacypolicy
163-
if (array_key_exists('PrivacyStatementURL', $state['Destination']['UIInfo']) && (!empty($state['Destination']['UIInfo']['PrivacyStatementURL']))) {
163+
if (array_key_exists('UIInfo', $state['Destination']) && array_key_exists('PrivacyStatementURL', $state['Destination']['UIInfo']) && (!empty($state['Destination']['UIInfo']['PrivacyStatementURL']))) {
164164
$privacypolicy = reset($state['Destination']['UIInfo']['PrivacyStatementURL']);
165165
} elseif (array_key_exists('privacypolicy', $state['Destination'])) {
166166
$privacypolicy = $state['Destination']['privacypolicy'];
167-
} elseif (array_key_exists('PrivacyStatementURL', $state['Source']['UIInfo']) && (!empty($state['Source']['UIInfo']['PrivacyStatementURL']))) {
167+
} elseif (array_key_exists('UIInfo', $state['Source']) && array_key_exists('PrivacyStatementURL', $state['Source']['UIInfo']) && (!empty($state['Source']['UIInfo']['PrivacyStatementURL']))) {
168168
$privacypolicy = reset($state['Source']['UIInfo']['PrivacyStatementURL']);
169169
} elseif (array_key_exists('privacypolicy', $state['Source'])) {
170170
$privacypolicy = $state['Source']['privacypolicy'];

0 commit comments

Comments
 (0)