Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
2a8ca600
Commit
2a8ca600
authored
Aug 01, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified parameter check for buildSimpleCondition()
parent
47ee0b87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
QueryBuilder.php
extensions/sphinx/QueryBuilder.php
+1
-1
QueryBuilder.php
framework/db/QueryBuilder.php
+1
-1
No files found.
extensions/sphinx/QueryBuilder.php
View file @
2a8ca600
...
@@ -995,7 +995,7 @@ class QueryBuilder extends Object
...
@@ -995,7 +995,7 @@ class QueryBuilder extends Object
*/
*/
public
function
buildSimpleCondition
(
$operator
,
$operands
,
&
$params
)
public
function
buildSimpleCondition
(
$operator
,
$operands
,
&
$params
)
{
{
if
(
empty
(
$operands
[
0
])
||
!
array_key_exists
(
1
,
$operands
)
)
{
if
(
count
(
$operands
)
!==
2
)
{
throw
new
InvalidParamException
(
"Operator '
$operator
' requires two operands."
);
throw
new
InvalidParamException
(
"Operator '
$operator
' requires two operands."
);
}
}
...
...
framework/db/QueryBuilder.php
View file @
2a8ca600
...
@@ -1203,7 +1203,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -1203,7 +1203,7 @@ class QueryBuilder extends \yii\base\Object
*/
*/
public
function
buildSimpleCondition
(
$operator
,
$operands
,
&
$params
)
public
function
buildSimpleCondition
(
$operator
,
$operands
,
&
$params
)
{
{
if
(
empty
(
$operands
[
0
])
||
!
array_key_exists
(
1
,
$operands
)
)
{
if
(
count
(
$operands
)
!==
2
)
{
throw
new
InvalidParamException
(
"Operator '
$operator
' requires two operands."
);
throw
new
InvalidParamException
(
"Operator '
$operator
' requires two operands."
);
}
}
...
...
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