PHP 8.2 _dmemcache_set_pieces() should return bool but returns int

Created on 1 March 2024, 4 months ago

Problem/Motivation

I caught and issue on PHP 8.2 during running of phpstan
_dmemcache_set_pieces() should return bool but returns int

Steps to reproduce

Switch to php 8.2 and check dblog or run phpstan with php8.2 checking

Proposed resolution

The issue caused because of bitwise operator in
$result &= dmemcache_set($cache->cid, $cache, $exp, $bin, $mc);
output can be 0 or 1;
I would suggest to fix annotation like
@return bool|int

πŸ› Bug report
Status

Needs review

Version

1.8

Component

Code

Created by

πŸ‡§πŸ‡ΎBelarus Andrei Haurukovich Minsk

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024