mirror of
				https://github.com/Seldaek/monolog.git
				synced 2025-10-24 18:16:10 +02:00 
			
		
		
		
	Fix serialization to include private properties, fixes #1727, fixes phpro/grumphp#1020
This commit is contained in:
		| @@ -48,6 +48,15 @@ abstract class Handler implements HandlerInterface | ||||
|     { | ||||
|         $this->close(); | ||||
|  | ||||
|         return array_keys(get_object_vars($this)); | ||||
|         $reflClass = new \ReflectionClass($this); | ||||
|  | ||||
|         $keys = []; | ||||
|         foreach ($reflClass->getProperties() as $reflProp) { | ||||
|             if (!$reflProp->isStatic()) { | ||||
|                 $keys[] = $reflProp->getName(); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return $keys; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user