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.
Drop convert_to usage in zend_exceptions
To make everything work correctly with refs. I'm unsure whether the GET_PROPERTY_SILENT distinction is really necessary, because the choice seemed pretty random, but kept it around.
- Loading branch information
Showing
2 changed files
with
69 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Exception with by-ref message | ||
--FILE-- | ||
<?php | ||
|
||
class MyException extends Exception | ||
{ | ||
public function __construct(&$msg) { | ||
$this->message =& $msg; | ||
} | ||
} | ||
|
||
$msg = 'Message'; | ||
throw new MyException($msg); | ||
|
||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught exception 'MyException' with message 'Message' in %s:%d | ||
Stack trace: | ||
#0 {main} | ||
thrown in %s on line %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