Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: ORM infinite save loop #16395

Closed
rudiservo opened this issue Aug 9, 2023 · 1 comment
Closed

[BUG]: ORM infinite save loop #16395

rudiservo opened this issue Aug 9, 2023 · 1 comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@rudiservo
Copy link
Contributor

rudiservo commented Aug 9, 2023

Describe the bug
The Model::save has no checks if a model has been called to be saved before, this can cause a infinite save loop.

Steps to reproduce the behavior:

$customer = Customers::findFirst();
$invoice = new Invoices();
$invoice->customer = $customer
$customers->invoices = [ $invoice ];
$customer->save();

image

Expected behavior
it is expected not so run save on the model that has already been called to saved.

Details

  • Phalcon version: 5.* but it affects all versions
  • PHP Version: 8.2
  • Operating System: Ubuntu
  • Installation type: docker
@rudiservo rudiservo added bug A bug report status: unverified Unverified labels Aug 9, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 10, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 11, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 11, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 11, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 14, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
rudiservo added a commit to rudiservo/cphalcon that referenced this issue Aug 15, 2023
niden added a commit that referenced this issue Aug 29, 2023
@niden niden added status: medium Medium 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels Aug 29, 2023
@niden
Copy link
Sponsor Member

niden commented Aug 29, 2023

Resolved in #16399

@niden niden closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Status: Released
Development

No branches or pull requests

2 participants