[Tickets #13455] [kronolith] PHP ERROR: Undefined offset: 1 [pid 8052 on line 169 of "/usr/share/php/Horde/Timezone/Zone.php"]
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed Aug 20 07:37:45 UTC 2014
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/13455
------------------------------------------------------------------------------
Ticket | 13455
Created By | skhorde at smail.inf.fh-bonn-rhein-sieg.de
Summary | [kronolith] PHP ERROR: Undefined offset: 1 [pid 8052 on
| line 169 of "/usr/share/php/Horde/Timezone/Zone.php"]
Queue | Horde Framework Packages
Version | Git master
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
skhorde at smail.inf.fh-bonn-rhein-sieg.de (2014-08-20 07:37) wrote:
I'm getting this error quite often from
$this->_info[$line] = array(
0 => '-0:36:32',
1 => '-',
2 => 'LMT',
3 => '1912',
4 => 'Jan',
5 => '1',
6 => '',
)
In line 140 of Horde/Timezone/Zone.php $date[3] == '', therefore line
141 matches nothing.
$time = isset($date[3]) && $date[3] != '-' ? $date[3] : 0;
Dunno if the data in the array makes any sense at all, but how about
to change:
$time = isset($date[3]) && $date[3] != '-' ? $date[3] : 0;
preg_match('/(\d+)(?::(\d+))?(?::(\d+))?(w|s|u)?/', $time, $match);
if (!isset($match[2])) {
into
! $time = isset($date[3])? $date[3] : 0;
preg_match('/(\d+)(?::(\d+))?(?::(\d+))?(w|s|u)?/', $time, $match);
+ if (!isset($match[1])) {
+ $match[1] = 0;
+ }
if (!isset($match[2])) {
More information about the bugs
mailing list