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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
75ee05b9
Commit
75ee05b9
authored
Jan 19, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more null fixes.
parent
4c2aaee4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
DbManager.php
framework/rbac/DbManager.php
+7
-7
No files found.
framework/rbac/DbManager.php
View file @
75ee05b9
...
@@ -216,7 +216,7 @@ class DbManager extends Manager
...
@@ -216,7 +216,7 @@ class DbManager extends Manager
->
queryAll
();
->
queryAll
();
$children
=
[];
$children
=
[];
foreach
(
$rows
as
$row
)
{
foreach
(
$rows
as
$row
)
{
if
((
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
if
(
!
isset
(
$row
[
'data'
])
||
(
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
$data
=
null
;
$data
=
null
;
}
}
$children
[
$row
[
'name'
]]
=
new
Item
([
$children
[
$row
[
'name'
]]
=
new
Item
([
...
@@ -251,7 +251,7 @@ class DbManager extends Manager
...
@@ -251,7 +251,7 @@ class DbManager extends Manager
'user_id'
=>
$userId
,
'user_id'
=>
$userId
,
'item_name'
=>
$itemName
,
'item_name'
=>
$itemName
,
'biz_rule'
=>
$bizRule
,
'biz_rule'
=>
$bizRule
,
'data'
=>
serialize
(
$data
),
'data'
=>
$data
===
null
?
null
:
serialize
(
$data
),
])
])
->
execute
();
->
execute
();
return
new
Assignment
([
return
new
Assignment
([
...
@@ -319,7 +319,7 @@ class DbManager extends Manager
...
@@ -319,7 +319,7 @@ class DbManager extends Manager
->
createCommand
(
$this
->
db
)
->
createCommand
(
$this
->
db
)
->
queryOne
();
->
queryOne
();
if
(
$row
!==
false
)
{
if
(
$row
!==
false
)
{
if
((
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
if
(
!
isset
(
$row
[
'data'
])
||
(
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
$data
=
null
;
$data
=
null
;
}
}
return
new
Assignment
([
return
new
Assignment
([
...
@@ -349,7 +349,7 @@ class DbManager extends Manager
...
@@ -349,7 +349,7 @@ class DbManager extends Manager
->
queryAll
();
->
queryAll
();
$assignments
=
[];
$assignments
=
[];
foreach
(
$rows
as
$row
)
{
foreach
(
$rows
as
$row
)
{
if
((
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
if
(
!
isset
(
$row
[
'data'
])
||
(
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
$data
=
null
;
$data
=
null
;
}
}
$assignments
[
$row
[
'item_name'
]]
=
new
Assignment
([
$assignments
[
$row
[
'item_name'
]]
=
new
Assignment
([
...
@@ -372,7 +372,7 @@ class DbManager extends Manager
...
@@ -372,7 +372,7 @@ class DbManager extends Manager
$this
->
db
->
createCommand
()
$this
->
db
->
createCommand
()
->
update
(
$this
->
assignmentTable
,
[
->
update
(
$this
->
assignmentTable
,
[
'biz_rule'
=>
$assignment
->
bizRule
,
'biz_rule'
=>
$assignment
->
bizRule
,
'data'
=>
serialize
(
$assignment
->
data
),
'data'
=>
$assignment
->
data
===
null
?
null
:
serialize
(
$assignment
->
data
),
],
[
],
[
'user_id'
=>
$assignment
->
userId
,
'user_id'
=>
$assignment
->
userId
,
'item_name'
=>
$assignment
->
itemName
,
'item_name'
=>
$assignment
->
itemName
,
...
@@ -411,7 +411,7 @@ class DbManager extends Manager
...
@@ -411,7 +411,7 @@ class DbManager extends Manager
}
}
$items
=
[];
$items
=
[];
foreach
(
$command
->
queryAll
()
as
$row
)
{
foreach
(
$command
->
queryAll
()
as
$row
)
{
if
((
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
if
(
!
isset
(
$row
[
'data'
])
||
(
$data
=
@
unserialize
(
$row
[
'data'
]))
===
false
)
{
$data
=
null
;
$data
=
null
;
}
}
$items
[
$row
[
'name'
]]
=
new
Item
([
$items
[
$row
[
'name'
]]
=
new
Item
([
...
@@ -537,7 +537,7 @@ class DbManager extends Manager
...
@@ -537,7 +537,7 @@ class DbManager extends Manager
'type'
=>
$item
->
type
,
'type'
=>
$item
->
type
,
'description'
=>
$item
->
description
,
'description'
=>
$item
->
description
,
'biz_rule'
=>
$item
->
bizRule
,
'biz_rule'
=>
$item
->
bizRule
,
'data'
=>
serialize
(
$item
->
data
),
'data'
=>
$item
->
data
===
null
?
null
:
serialize
(
$item
->
data
),
],
[
],
[
'name'
=>
$oldName
===
null
?
$item
->
getName
()
:
$oldName
,
'name'
=>
$oldName
===
null
?
$item
->
getName
()
:
$oldName
,
])
])
...
...
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