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

Validation values #85

Open
ShipilovDG opened this issue Feb 4, 2022 · 1 comment
Open

Validation values #85

ShipilovDG opened this issue Feb 4, 2022 · 1 comment

Comments

@ShipilovDG
Copy link

private function encodeLabelValues(array $values): string

if some of $values will be numeric, like status code for example, then it will not work with "false !== ($value = apcu_fetch($key))", because json_encode will return different strings to base64encoder.

i tried this and it works, but i guess it's bad solution. Hope i helped with something.

    //status code to int from string
    if(isset($values[1])){
        $mayBeStatusCode = $values[1];
        $values[1] = is_numeric($mayBeStatusCode) ? (int) $mayBeStatusCode : $mayBeStatusCode;
    }
@ShipilovDG
Copy link
Author

@LKaemmerling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant