Fix stack trace handling with resources in parameters
authorTim Düsterhus <duesterhus@woltlab.com>
Sat, 10 Feb 2018 14:58:54 +0000 (15:58 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Sat, 10 Feb 2018 14:59:35 +0000 (15:59 +0100)
wcfsetup/install/files/lib/core.functions.php

index 64de353523afb0241df32523df4efa50f01a9cc8..2e3a2620b9955e2effe6a51bcaf2532f8c8e24be 100644 (file)
@@ -135,6 +135,8 @@ namespace wcf\functions\exception {
                                                        return array_map(function () {
                                                                return '[redacted]';
                                                        }, $item);
+                                               case 'resource':
+                                                       return 'resource('.get_resource_type($item).')';
                                                default:
                                                        return $item;
                                        }
@@ -535,6 +537,8 @@ EXPLANATION;
                                                                                                                }, $keys)).']';
                                                                                                        case 'object':
                                                                                                                return get_class($item);
+                                                                                                       case 'resource':
+                                                                                                               return 'resource('.get_resource_type($item).')';
                                                                                                }
                                                                                                
                                                                                                throw new \LogicException('Unreachable');