Skip to content

Commit f4e9382

Browse files
Update src/integrations/SparxstarGluonRules.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Max Barrett <34328348+MaximillianGroup@users.noreply.github.com>
1 parent a480cd0 commit f4e9382

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/integrations/SparxstarGluonRules.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,15 @@ public function gluonGetUserConsent(): string|false {
306306
* override the global consent mechanism.
307307
*
308308
* @since 1.0.0
309-
* @param string $type The current consent type set by the site or another plugin.
309+
* @param string|false $type The current consent type set by the site or another plugin.
310310
* @return string The existing consent type, or 'optin' when none is set.
311311
*/
312-
public function gluonSetConsentType( string $type ): string {
313-
return $type ?: 'optin';
312+
public function gluonSetConsentType( string|false $type ): string {
313+
if ( false === $type || '' === $type ) {
314+
return 'optin';
315+
}
316+
317+
return $type;
314318
}
315319

316320
/**

0 commit comments

Comments
 (0)