File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,24 @@ public function __construct() {
160160 }
161161 }
162162
163+ /**
164+ * Compatibility for clone() method for PHP versions less than 7.0.
165+ *
166+ * See: https://github.com/sugarcalendar/core/issues/105
167+ *
168+ * This shim will be removed at a later date.
169+ *
170+ * @since 2.0.20
171+ *
172+ * @param string $function
173+ * @param array $args
174+ */
175+ public function __call ( $ function = '' , $ args = array () ) {
176+ if ( 'clone ' === $ function ) {
177+ call_user_func_array ( array ( $ this , '_clone ' ), $ args );
178+ }
179+ }
180+
163181 /** Abstract **************************************************************/
164182
165183 /**
@@ -488,7 +506,7 @@ public function delete_all() {
488506 *
489507 * @return bool
490508 */
491- public function clone ( $ new_table_name = '' ) {
509+ public function _clone ( $ new_table_name = '' ) {
492510
493511 // Get the database interface
494512 $ db = $ this ->get_db ();
You can’t perform that action at this time.
0 commit comments