removed some stuff

This commit is contained in:
2019-12-26 05:34:24 +00:00
parent 0b587aaec6
commit dee4e0d751
763 changed files with 71 additions and 158263 deletions
+10 -1
View File
@@ -47,6 +47,15 @@ class Caster
*/
public static function castObject($obj, string $class, bool $hasDebugInfo = false): array
{
if ($hasDebugInfo) {
try {
$debugInfo = $obj->__debugInfo();
} catch (\Exception $e) {
// ignore failing __debugInfo()
$hasDebugInfo = false;
}
}
$a = $obj instanceof \Closure ? [] : (array) $obj;
if ($obj instanceof \__PHP_Incomplete_Class) {
@@ -82,7 +91,7 @@ class Caster
}
}
if ($hasDebugInfo && \is_array($debugInfo = $obj->__debugInfo())) {
if ($hasDebugInfo && \is_array($debugInfo)) {
foreach ($debugInfo as $k => $v) {
if (!isset($k[0]) || "\0" !== $k[0]) {
$k = self::PREFIX_VIRTUAL.$k;