Commit 7dcddad 1 parent 2d94af5 commit 7dcddad Copy full SHA for 7dcddad
File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,24 @@ public function __construct() {
160
160
}
161
161
}
162
162
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
+
163
181
/** Abstract **************************************************************/
164
182
165
183
/**
@@ -488,7 +506,7 @@ public function delete_all() {
488
506
*
489
507
* @return bool
490
508
*/
491
- public function clone ( $ new_table_name = '' ) {
509
+ public function _clone ( $ new_table_name = '' ) {
492
510
493
511
// Get the database interface
494
512
$ db = $ this ->get_db ();
You can’t perform that action at this time.
0 commit comments