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
f92f78e5
Commit
f92f78e5
authored
Jul 10, 2016
by
Armando Lüscher
Committed by
GitHub
Jul 10, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #248 from MBoretto/durationfix
allow value 0 for duration
parents
98f13b08
281f39e1
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 @
f92f78e5
...
...
@@ -34,7 +34,7 @@ class Audio extends Entity
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
empty
(
$this
->
duration
)
)
{
if
(
$this
->
duration
===
''
||
$this
->
duration
===
null
)
{
throw
new
TelegramException
(
'duration is empty!'
);
}
...
...
src/Entities/Video.php
View file @
f92f78e5
...
...
@@ -45,7 +45,7 @@ class Video extends Entity
throw
new
TelegramException
(
'height is empty!'
);
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
empty
(
$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 @
f92f78e5
...
...
@@ -32,7 +32,7 @@ class Voice extends Entity
}
$this
->
duration
=
isset
(
$data
[
'duration'
])
?
$data
[
'duration'
]
:
null
;
if
(
empty
(
$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