mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Merge pull request #181 from zemiacsik/2.1_php72support
added support for PHP 7.2
This commit is contained in:
commit
5d1c30d1c0
@ -6,3 +6,9 @@ if (!defined('BULKEDITTOOLS_PATH')) {
|
||||
define('BULKEDITTOOLS_UPLOAD_PATH', $folder.'/bulkUpload');
|
||||
define('BULKEDITTOOLS_MANAGER_PATH', $folder.'/bulkManager');
|
||||
}
|
||||
|
||||
// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
|
||||
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
|
||||
if (!class_exists('SS_Object')) {
|
||||
class_alias('Object', 'SS_Object');
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ class GridFieldBulkUpload_Request extends RequestHandler
|
||||
{
|
||||
//create record
|
||||
$recordClass = $this->component->getRecordClassName($this->gridField);
|
||||
$record = Object::create($recordClass);
|
||||
$record = SS_Object::create($recordClass);
|
||||
$record->write();
|
||||
|
||||
// passes the current gridfield-instance to a call-back method on the new object
|
||||
@ -215,7 +215,7 @@ class GridFieldBulkUpload_Request extends RequestHandler
|
||||
|
||||
foreach ($attachResponses as $attachResponse) {
|
||||
// create record
|
||||
$record = Object::create($recordClass);
|
||||
$record = SS_Object::create($recordClass);
|
||||
$record->write();
|
||||
$record->extend('onBulkUpload', $this->gridField);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user