1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Commit Graph

1 Commits

Author SHA1 Message Date
Nikita Popov 55dd3945fb Convert Exception::getMessage() result to string
We specify that the return type of Exception::getMessage() is a
string. However, we don't currently ensure this, because
Exception::$message is a protected member that can be set to any
type. Fix this by performing an explicit type-cast.

This also requires a temporary refcount increment in the __toString()
object handler, because there is no additional owner of the object,
and it may get released prematurely as part of the __toString() call.
2020-05-28 11:51:35 +02:00