Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
commerce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
24
Merge Requests
24
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
commerce
Commits
7a9664db
Commit
7a9664db
authored
Jul 22, 2015
by
bojanz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't throw notices in postDelete() if the deleted entity is malformed (required field empty).
parent
6614f6c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
modules/order/src/Entity/Order.php
modules/order/src/Entity/Order.php
+3
-0
modules/product/src/Entity/Product.php
modules/product/src/Entity/Product.php
+3
-0
No files found.
modules/order/src/Entity/Order.php
View file @
7a9664db
...
...
@@ -107,6 +107,9 @@ class Order extends ContentEntityBase implements OrderInterface {
// Delete the line items of a deleted order.
$lineItems
=
[];
foreach
(
$entities
as
$entity
)
{
if
(
empty
(
$entity
->
line_items
))
{
continue
;
}
foreach
(
$entity
->
line_items
as
$item
)
{
$lineItems
[
$item
->
target_id
]
=
$item
->
entity
;
}
...
...
modules/product/src/Entity/Product.php
View file @
7a9664db
...
...
@@ -186,6 +186,9 @@ class Product extends ContentEntityBase implements ProductInterface {
// Delete the product variations of a deleted product.
$variations
=
[];
foreach
(
$entities
as
$entity
)
{
if
(
empty
(
$entity
->
variations
))
{
continue
;
}
foreach
(
$entity
->
variations
as
$item
)
{
$variations
[
$item
->
target_id
]
=
$item
->
entity
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment