php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59039 Bloomy always returns true for empty strings
Submitted: 2010-01-22 05:30 UTC Modified: 2017-04-01 19:37 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: contato at sanainside dot com Assigned:
Status: Wont fix Package: bloomy (PECL)
PHP Version: 5.3.0 OS: Centos 5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 + 37 = ?
Subscribe to this entry?

 
 [2010-01-22 05:30 UTC] contato at sanainside dot com
Description:
------------
For every bloomfilter i create with this extensions, the method has() always returns true when passed an empty string. btw, thanks for your time doing it, it's really useful.

Reproduce code:
---------------
$bf = new BloomFilter(3, 0.0001);
$bf->add("foo");
$bf->add("bar");
$bf->add("xyz");

var_dump($bf->has("foo"));
var_dump($bf->has("blabla"));
var_dump($bf->has(""));

Expected result:
----------------
true
false
false

Actual result:
--------------
true
false
true

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:37 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 19:37 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2009, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC