You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.
Describe the bug
We're implementing the Klarna Checkout SDK for one of our customer projects and noticed that we were repeatedly getting a lot of debug information through the requests even though we had defined DEBUG_SDK as false. When we went into the code we could out why. You're correctly using getenv to check if the value exists and get the value, but you're then only checking if the constant is actually defined, not it's value.
This behaviour was made intentionally. The problem with the environment variables - they are always strings and must be converted to bool before use.
So once getting the value you should guess, what is it? Should it be "false"/"true"? "Y"/"N"? "1"/"0"? How to react on "blablabla" inside the variable or "null"
Some of them have status Closed, some Won't fix, but anyway - the reason why we decided to not to parse the input - just to simplify the checking function and avoid possible issues with type casting.
I agree, that this can confuse and probably I need to change the README and add more details about the DEBUG_SDK flag.
Describe the bug
We're implementing the Klarna Checkout SDK for one of our customer projects and noticed that we were repeatedly getting a lot of debug information through the requests even though we had defined
DEBUG_SDK
as false. When we went into the code we could out why. You're correctly using getenv to check if the value exists and get the value, but you're then only checking if the constant is actually defined, not it's value.The issue is at this line:
kco_rest_php/src/Klarna/Rest/Resource.php
Line 142 in cf5c0e8
Which service do you use
Klarna Checkout
To Reproduce
Steps to reproduce the behavior:
DEBUG_SDK
constant as false as below:<?php define('DEBUG_SDK', false); ?>
Expected behavior
Klarna SDK debug output should not show.
The text was updated successfully, but these errors were encountered: