Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory-plugins
Commits
8731cbde
Commit
8731cbde
authored
Mar 08, 2017
by
Côme Chilliet
Browse files
Fixes
#5414
Added empty values for optional partition fields to avoid PHP errors
parent
1fd2b06b
Changes
1
Hide whitespace changes
Inline
Side-by-side
fai/admin/fai/class_faiPartitionTable.inc
View file @
8731cbde
...
...
@@ -142,8 +142,10 @@ class PartitionTableAttribute extends DialogOrderedArrayAttribute
$ldap
->
search
(
$this
->
diskFilter
,
array
(
'*'
),
'one'
);
$this
->
value
=
array
();
while
(
$subattrs
=
$ldap
->
fetch
())
{
$diskInfos
=
array
(
'description'
=>
''
,
'FAIdiskType'
=>
'disk'
);
$diskInfos
[
'description'
]
=
''
;
$diskInfos
=
array
(
'description'
=>
''
,
'FAIdiskType'
=>
'disk'
);
foreach
(
array
(
'cn'
,
'description'
,
'FAIdiskType'
)
as
$attr
)
{
if
(
isset
(
$subattrs
[
$attr
][
0
]))
{
$diskInfos
[
$attr
]
=
$subattrs
[
$attr
][
0
];
...
...
@@ -175,7 +177,10 @@ class PartitionTableAttribute extends DialogOrderedArrayAttribute
$ldap
->
cd
(
$disk
[
'dn'
]);
$ldap
->
search
(
$this
->
partFilter
,
array
(
'*'
),
'one'
);
while
(
$obj
=
$ldap
->
fetch
())
{
$partitionInfos
=
array
();
$partitionInfos
=
array
(
'description'
=>
''
,
'FAIpartitionSize'
=>
''
,
);
foreach
(
$this
->
partitionAttributes
as
$attr
)
{
if
(
isset
(
$obj
[
$attr
][
0
]))
{
$partitionInfos
[
$attr
]
=
$obj
[
$attr
][
0
];
...
...
Côme Chilliet
@cchilliet
mentioned in issue
#1515 (closed)
·
Sep 02, 2017
mentioned in issue
#1515 (closed)
mentioned in issue #1515
Toggle commit list
Write
Preview
Supports
Markdown
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