Closed JJJ closed 2 years ago
Turns out that clone
is still a reserved keyword in versions of PHP less than 7. 😞
That means PHP versions like 5.6 will complain about the clone()
method.
Going to keep the code as is for now, but noting it in case anyone else gets caught with T_CLONE
PHP fatal errors. Here's one from Sugar Calendar:
PHP Parse error: syntax error, unexpected 'clone' (T_CLONE), expecting identifier (T_STRING) in /app/public/content/plugins/sugar-calendar/sugar-event-calendar/includes/classes/database/engine/class-table.php on line 490
@JJJ Do you have any thoughts about adding the fix from https://github.com/awesomemotive/sugarcalendar-core/issues/105 to the library directly? When managing BerlinDB with Composer and using PHP 5.6 (which isn't explicitly not supported) the clone
method needs to be renamed after each install.
@spencerfinnell Probably worth porting that fix here and removing it when 5.6 support gets dropped?
@JJJ I think that makes the most sense. I'm 100% certain I'm going to forget to edit it one day and break 5.6 compatibility accidentally :(
Just as the title says, the
Table
class currently lacks any method(s) related to taking all of the data in the current table and copying it (temporarily or permanently) to another table/location.