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: Fixed defective cloning in ext/intl classes NEWS for commit 72c807a Allow Spoofchecker to be registered on ICU 49.1 Announce on NEWS change in 1ce572c
- Loading branch information
Showing
7 changed files
with
40 additions
and
7 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,33 @@ | |||
--TEST-- | |||
Bug #62915: cloning of several classes is defective | |||
--SKIPIF-- | |||
<?php | |||
if (!extension_loaded('intl')) | |||
die('skip intl extension not enabled'); | |||
--FILE-- | |||
<?php | |||
class A extends IntlDateFormatter { | |||
static $ARGS = array("en_US" ,IntlDateFormatter::FULL, IntlDateFormatter::FULL, | |||
'America/Los_Angeles', IntlDateFormatter::GREGORIAN); | |||
} | |||
class B extends NumberFormatter { | |||
static $ARGS = array('de_DE', NumberFormatter::DECIMAL); | |||
} | |||
class C extends MessageFormatter { | |||
static $ARGS = array("en_US", "foo"); | |||
} | |||
class D extends Spoofchecker { | |||
static $ARGS = array(); | |||
} | |||
|
|||
foreach (range('A', 'D') as $subclass) { | |||
$rc = new ReflectionClass($subclass); | |||
$obj = $rc->newInstanceArgs($subclass::$ARGS); | |||
$clone = clone $obj; | |||
var_dump(get_class($clone)); | |||
} | |||
--EXPECT-- | |||
string(1) "A" | |||
string(1) "B" | |||
string(1) "C" | |||
string(1) "D" |
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