Last modified: 2014-08-16 10:52:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70841, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68841 - HHVM and pecl Redis::get() return inconsistent failure values
HHVM and pecl Redis::get() return inconsistent failure values
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-30 03:32 UTC by spage
Modified: 2014-08-16 10:52 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2014-07-30 03:32:34 UTC
(From Erik Bernhardson)

HHVM's Redis::get() returns null on failure, while pecl-redis' Redis::get() returns false on failure.  There's no good way to distinguish the two classes with same name.

The Flow extension works around this when calling getMulti(), by filtering out false values; see I6d81d4a1bc6745 .
Comment 1 Ori Livneh 2014-07-30 17:05:08 UTC
Confirmed. Minimal case:

  $ php5 -r '$redis = new Redis; $redis->connect("localhost"); var_dump($redis->get("nonexistent-key"));'
  bool(false)
  $ hhvm --php -r '$redis = new Redis; $redis->connect("localhost"); var_dump($redis->get("nonexistent-key"));'
  NULL
Comment 2 Ori Livneh 2014-07-30 19:50:15 UTC
Submitted a fix upstream: https://github.com/facebook/hhvm/pull/3318
Comment 3 Andre Klapper 2014-08-16 10:16:26 UTC
(In reply to Ori Livneh from comment #2)
> Submitted a fix upstream: https://github.com/facebook/hhvm/pull/3318


Got merged: https://github.com/facebook/hhvm/commit/47b3503c741d2124ed972d1e617eb712148c92c8

What's left to do here?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links