Changes between Initial Version and Version 1 of Ticket #10861, comment 1
- Timestamp:
- 03/05/2011 07:40:00 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10861, comment 1
initial v1 1 The constructor (PHP 4, PHP 5) still might have errors. In case PHP 5 prefers the class names function instead of the __construct()function (for example for backwards compability reasons, I was not able to clarify that in all details), the register_shutdown_function will be called with PHP 4 and PHP 5. It should only called with PHP 4.1 The constructor (PHP 4, PHP 5) still might have errors. In case PHP 5 prefers the class names function instead of the `__construct()` function (for example for backwards compability reasons, I was not able to clarify that in all details), the register_shutdown_function will be called with PHP 4 and PHP 5. It should only called with PHP 4. 2 2 3 Additionally, having an empty function ( wpdb::__destruct) does not make any sense. This leads to asking oneself: what is all the fuzz about? Constructor, Destructor, NIL. I assume this needs a cleanup.3 Additionally, having an empty function (`wpdb::__destruct()`) does not make any sense. This leads to asking oneself: what is all the fuzz about? Constructor, Destructor, NIL. I assume this needs a cleanup. 4 4 5 This would also lead to a solution for some other important point: Never register a __destructfunction as a shutdown function. This will most often lead to problems (the function is called two times) and errors (the object is already destroyed when the shutdown function is (to be) executed).5 This would also lead to a solution for some other important point: Never register a `__destruct()` function as a shutdown function. This will most often lead to problems (the function is called two times) and errors (the object is already destroyed when the shutdown function is (to be) executed). 6 6 7 7 Therefore I suggest to remove this all from the object, I will provide a second patch for it.