Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kulya
TelegramBot
Commits
281f39e1
Commit
281f39e1
authored
Jul 10, 2016
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check also for null duration
parent
8c30df89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Audio.php
src/Entities/Audio.php
+1
-1
Video.php
src/Entities/Video.php
+1
-1
Voice.php
src/Entities/Voice.php
+1
-1
No files found.
src/Entities/Audio.php
View file @
281f39e1
...
...
@@ -34,7 +34,7 @@ class Audio extends Entity
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
$this
->
duration
===
''
)
{
if
(
$this
->
duration
===
''
||
$this
->
duration
===
null
)
{
throw
new
TelegramException
(
'duration is empty!'
);
}
...
...
src/Entities/Video.php
View file @
281f39e1
...
...
@@ -45,7 +45,7 @@ class Video extends Entity
throw
new
TelegramException
(
'height is empty!'
);
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
$this
->
duration
===
''
)
{
if
(
$this
->
duration
===
''
||
$this
->
duration
===
null
)
{
throw
new
TelegramException
(
'duration is empty!'
);
}
$this
->
thumb
=
isset
(
$data
[
'thumb'
])
?
$data
[
'thumb'
]
:
null
;
...
...
src/Entities/Voice.php
View file @
281f39e1
...
...
@@ -32,7 +32,7 @@ class Voice extends Entity
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
$this
->
duration
===
''
)
{
if
(
$this
->
duration
===
''
||
$this
->
duration
===
null
)
{
throw
new
TelegramException
(
'duration is empty!'
);
}
...
...
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