Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Possible bug in Query::dsql() returning new self() #116

Closed
tasso85 opened this issue Mar 10, 2017 · 1 comment
Closed

Possible bug in Query::dsql() returning new self() #116

tasso85 opened this issue Mar 10, 2017 · 1 comment
Assignees

Comments

@tasso85
Copy link

tasso85 commented Mar 10, 2017

The method has the following signature and body:

public function dsql($properties = [])
{
	$q = new self($properties);
	$q->connection = $this->connection;

	return $q;
}

This meas that, when called from an object that is actually a Query_MySQL, it'll return a simple Query instead, shouldn't it be better to use new static() instead ?

@romaninsh
Copy link
Member

For more info http://stackoverflow.com/questions/15898843/what-means-new-static, i think you are correct on this one.

@romaninsh romaninsh self-assigned this Mar 14, 2017
DarkSide666 pushed a commit that referenced this issue Mar 14, 2017
* Fix cases when DSQL class is extended and Query::dsql is called. Resolve #116

* lets see if this can fix segfault

* update phpunit version to 5.x latest

* Revert "update phpunit version to 5.x latest"

This reverts commit a012f15.

* Improve merging of coverage logs

* move merged report over the existing one

* Revert "move merged report over the existing one"

This reverts commit ab8b90a.

* fix upload properly of codecov
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants