Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lolo888
ISPConfig 3
Commits
41a74e15
Commit
41a74e15
authored
Sep 12, 2012
by
mcramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: Thrown php warning - added check if parameter is an array in validator
parent
753da508
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
interface/lib/classes/validate_datetime.inc.php
interface/lib/classes/validate_datetime.inc.php
+3
-1
No files found.
interface/lib/classes/validate_datetime.inc.php
View file @
41a74e15
...
...
@@ -74,7 +74,8 @@ class validate_datetime
*/
function
_get_timestamp_value
(
$field_value
)
{
$second
=
0
;
if
(
!
is_array
(
$field_value
))
return
0
;
$second
=
0
;
$filtered_values
=
array_map
(
create_function
(
'$item'
,
'return (int)$item;'
),
$field_value
);
extract
(
$filtered_values
,
EXTR_OVERWRITE
);
...
...
@@ -93,6 +94,7 @@ class validate_datetime
*/
function
not_empty
(
$field_name
,
$field_value
,
$validator
)
{
if
(
!
is_array
(
$field_value
))
return
$this
->
_get_error
(
$validator
[
'errmsg'
]);
extract
(
$field_value
);
if
(
!
(
$day
>
0
&&
$month
>
0
&&
$year
>
0
)
)
{
return
$this
->
_get_error
(
$validator
[
'errmsg'
]);
...
...
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