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

Added the CDbCommand::throwExceptionIfSqlQueryTextExists() method #4550

Conversation

JustMisha
Copy link

This method is called by the methods that populate the $_query array to prevent hard to debug errors.

If __construct() or setText sets $_text there is no point in using the methods like select(), from(), etc after that because the sql query text already exists and the buildQuery() method will never be called.

This method is called by the methods that populate the $_query array to prevent hard to debug errors.
@marcovtwout
Copy link
Member

Thanks for your PR, but Yii 1 is only accepting compatibility and security fixes as it is in maintainance mode. Also I understand why you would want the framework to prevent this kind of misusage of the query builder, but this is not something we can change easily and keep backward compatible.

@marcovtwout marcovtwout closed this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants