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

ShmMap::getMap(): Return value must be of type array, bool returned #2

Open
nop1984 opened this issue Jun 11, 2023 · 1 comment
Open
Labels

Comments

@nop1984
Copy link

nop1984 commented Jun 11, 2023

TypeError: PhpComp\Shm\ShmMap::getMap(): Return value must be of type array, bool returned in /mnt/g/youpal/job-verification-bot/vendor/php-comp/shm/src/ShmMap.php:207
Stack trace:
#0 /mnt/g/youpal/job-verification-bot/index.php(234): PhpComp\Shm\ShmMap->getMap()

        if (!$read = $this->shm->read()) {
            return [];
        }

should be

        if (!$read = trim($this->shm->read())) {
            return [];
        }

because read() returns long sequence of zero chars which are not considered as empty

@inhere inhere added the bug label Jun 11, 2023
@inhere
Copy link
Member

inhere commented Jun 11, 2023

@nop1984 thanks you report.
can you send a PR fix this? :)

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

No branches or pull requests

2 participants