SS5 compatibility

This commit is contained in:
PixNyb 2024-03-20 10:37:21 +00:00
parent e826bfebd6
commit a208bee685
No known key found for this signature in database
GPG Key ID: 3D8A3F6458B449FB
3 changed files with 13 additions and 5 deletions

5
.gitignore vendored
View File

@ -6,4 +6,7 @@
.transifexrc
**/css/bourbon
**/.sass-cache
node_modules/
node_modules/
vendor/
public/
composer.lock

View File

@ -3,7 +3,12 @@
"type": "silverstripe-vendormodule",
"description": "SilverStripe GridField component to upload images/files and edit records in bulk",
"homepage": "https://github.com/colymba/GridFieldBulkEditingTools",
"keywords": ["silverstripe", "bulk upload", "image upload", "gridfield bulk upload"],
"keywords": [
"silverstripe",
"bulk upload",
"image upload",
"gridfield bulk upload"
],
"license": "BSD-3-Clause",
"authors": [
{

View File

@ -123,7 +123,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
*/
public function addHeader($header, $value)
{
if($header === "content-type") {
if ($header === "content-type") {
return $this;
}
return parent::addHeader($header, $value);
@ -139,7 +139,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
*/
public function removeHeader($header)
{
if($header === "content-type") {
if ($header === "content-type") {
return $this;
}
return parent::removeHeader($header);
@ -333,7 +333,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
);
foreach ($this->successRecords as $record) {
$data = array('id' => $record->ID, 'class' => str_replace('\\', '\\\\', $record->ClassName));
$data = array('id' => $record->ID, 'class' => str_replace('\\', '\\\\', $record->ClassName ?? ''));
if (!$this->removesRows) {
$data['row'] = $this->getRecordGridfieldRow($record);
}