forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-5.4: Copy dba_*() keys before converting to string.
- Loading branch information
Showing
3 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--TEST-- | ||
Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write) | ||
--SKIPIF-- | ||
<?php | ||
require_once(dirname(__FILE__) .'/skipif.inc'); | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
error_reporting(E_ALL); | ||
|
||
require_once(dirname(__FILE__) .'/test.inc'); | ||
|
||
$db = dba_popen($db_filename, 'c'); | ||
|
||
$key = 1; | ||
$copy = $key; | ||
|
||
echo gettype($key)."\n"; | ||
echo gettype($copy)."\n"; | ||
|
||
dba_exists($key, $db); | ||
|
||
echo gettype($key)."\n"; | ||
echo gettype($copy)."\n"; | ||
|
||
dba_close($db); | ||
|
||
?> | ||
--CLEAN-- | ||
<?php | ||
require(dirname(__FILE__) .'/clean.inc'); | ||
?> | ||
--EXPECT-- | ||
integer | ||
integer | ||
integer | ||
integer |