Skip to content

Commit 0401c4e

Browse files
committed
merge with origin
2 parents 0ea837d + c7ee317 commit 0401c4e

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

doc/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
test/main/Utils/AMQP/AMQPPeclTest.class.php:
1717
added suppot for pecl amqp 1.0.4
1818

19+
2012-09-06 Igor V. Gulyaev
20+
21+
* main/Base/Hstore.class.php
22+
test/main/HstoreTest.class.php: fix hstore key exist check
23+
1924
2012-08-28 Artem A. Naumenko
2025

2126
* main/Net/GenericUri.class.php: utf modifier added to RegExp pattern

main/Base/Hstore.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function drop($key)
8585

8686
public function isExists($key)
8787
{
88-
return isset($this->properties[$key]);
88+
return key_exists($key, $this->properties);
8989
}
9090

9191
/**

test/main/HstoreTest.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ public function testRun()
1616
$array = array(
1717
'1' => 'qqer',
1818
'f' => 'qs34$9&)_@+#qer',
19+
'null' => null
1920
);
2021

2122
$test = Hstore::make($array);
2223
$test2= Hstore::create($test->toString());
2324

2425
$this->assertEquals($test->toString(), $test2->toString());
26+
27+
$this->assertTrue($test->isExists('null'));
28+
$this->assertFalse($test->isExists('notExist'));
2529
}
2630
}

0 commit comments

Comments
 (0)