Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Statement.php

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's never had a __clone before.

This was (I'm guessing) a rewrite of Laminas\Db\Adapter\Driver\Mysqli\Statement which didn't have one. The PDO version DID. So it was more about this not being parity with it's PDO sibling.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting that PDO also nulls the resource property during clone

Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,15 @@ protected function bindParametersFromContainer(): void
call_user_func_array([$this->resource, 'bind_param'], $args);
}
}

public function __clone()
{
$this->isPrepared = false;
$this->parameterContainer = clone $this->parameterContainer;

/**
* TODO: @tyrsson @simon-mundy
* Track down when this was dropped and why.
*/
}
}