Quote table names in admin_get_XXX() functions of t3lib_db
[Packages/TYPO3.CMS.git] / t3lib / compat_php5.php
1 <?php
2 /**
3 * TYPO3 compatibility layer PHP4 <> PHP5
4 * These functions provide PHP5 functionality when not available (in PHP4).
5 *
6 * @author René Fritz <r.fritz@colorcube.de>
7 */
8
9
10 /**
11 * borrowed from PEAR
12 * @author Aidan Lister <aidan@php.net>
13 */
14
15 eval('
16 function clone($object)
17 {
18 // Sanity check
19 if (!is_object($object)) {
20 user_error(\'clone() __clone method called on non-object\', E_USER_WARNING);
21 return;
22 }
23
24 // Use serialize/unserialize trick to deep copy the object
25 $object = unserialize(serialize($object));
26
27 // If there is a __clone method call it on the "new" class
28 if (method_exists($object, \'__clone\')) {
29 $object->__clone();
30 }
31
32 return $object;
33 }
34 ');
35
36
37 ?>