File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/code/Magento/Catalog/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ protected function _beforeSave(\Magento\Framework\DataObject $object)
278
278
if ($ object ->getPosition () === null ) {
279
279
$ object ->setPosition ($ this ->_getMaxPosition ($ object ->getPath ()) + 1 );
280
280
}
281
- $ path = explode ('/ ' , $ object ->getPath ());
281
+ $ path = explode ('/ ' , ( string ) $ object ->getPath ());
282
282
$ level = count ($ path ) - ($ object ->getId () ? 1 : 0 );
283
283
$ toUpdateChild = array_diff ($ path , [$ object ->getId ()]);
284
284
@@ -317,7 +317,7 @@ protected function _afterSave(\Magento\Framework\DataObject $object)
317
317
/**
318
318
* Add identifier for new category
319
319
*/
320
- if (substr ($ object ->getPath (), -1 ) == '/ ' ) {
320
+ if (substr (( string ) $ object ->getPath (), -1 ) == '/ ' ) {
321
321
$ object ->setPath ($ object ->getPath () . $ object ->getId ());
322
322
$ this ->_savePath ($ object );
323
323
}
You can’t perform that action at this time.
0 commit comments