OSDN Git Service
(root)
/
magic3
/
magic3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fda82fb
)
カレンダーライブラリ修正。
author
naoki hirata
<naoki@magic3.org>
Tue, 16 Jan 2018 01:31:24 +0000
(10:31 +0900)
committer
naoki hirata
<naoki@magic3.org>
Tue, 16 Jan 2018 01:31:24 +0000
(10:31 +0900)
include/lib/Calendar-0.5.5/Calendar.php
patch
|
blob
|
history
diff --git
a/include/lib/Calendar-0.5.5/Calendar.php
b/include/lib/Calendar-0.5.5/Calendar.php
index
59a224d
..
32ec15c
100644
(file)
--- a/
include/lib/Calendar-0.5.5/Calendar.php
+++ b/
include/lib/Calendar-0.5.5/Calendar.php
@@
-405,13
+405,24
@@
class Calendar
*/
function fetch()
{
- $child = each($this->children);
+
/*
$child = each($this->children);
if ($child) {
return $child['value'];
} else {
reset($this->children);
return false;
}
+ */
+ // PHP7.2非奨励のeach()を置き換え
+ $key = key($this->children);
+ if ($key){
+ $value = $this->children[$key];
+ next($this->children);
+ return $value;
+ } else {
+ reset($this->children);
+ return false;
+ }
}
/**