• R/O
  • HTTP
  • SSH
  • HTTPS

magic3: 提交

Cloud computing platform


Commit MetaInfo

修訂b967625ebec73e4cc09e984c2425ee68e6b56330 (tree)
時間2018-01-16 10:31:24
作者naoki hirata <naoki@magi...>
Commiternaoki hirata

Log Message

カレンダーライブラリ修正。

Change Summary

差異

--- a/include/lib/Calendar-0.5.5/Calendar.php
+++ b/include/lib/Calendar-0.5.5/Calendar.php
@@ -405,13 +405,24 @@ class Calendar
405405 */
406406 function fetch()
407407 {
408- $child = each($this->children);
408+/* $child = each($this->children);
409409 if ($child) {
410410 return $child['value'];
411411 } else {
412412 reset($this->children);
413413 return false;
414414 }
415+ */
416+ // PHP7.2非奨励のeach()を置き換え
417+ $key = key($this->children);
418+ if ($key){
419+ $value = $this->children[$key];
420+ next($this->children);
421+ return $value;
422+ } else {
423+ reset($this->children);
424+ return false;
425+ }
415426 }
416427
417428 /**
Show on old repository browser