{"id":400,"date":"2021-03-03T01:43:45","date_gmt":"2021-03-02T16:43:45","guid":{"rendered":"http:\/\/www.dracula.mydns.jp\/blog\/?p=400"},"modified":"2021-03-04T21:06:01","modified_gmt":"2021-03-04T12:06:01","slug":"php%e3%82%92%e3%82%92%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e3%82%a2%e3%83%83%e3%83%97%e3%81%97%e3%81%9f%e3%82%89wordpress%e3%81%8c%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%a7%e5%8b%95%e3%81%8b","status":"publish","type":"post","link":"https:\/\/www.dracula.mydns.jp\/blog\/?p=400","title":{"rendered":"PHP\u3092\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u3089WordPress\u304c\u30a8\u30e9\u30fc\u3067\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u3093\u3060\u304c"},"content":{"rendered":"\n<p>\u3053\u306e\u30d6\u30ed\u30b0\u306fWordPress\u3067\u52d5\u3044\u3066\u3044\u308b\u3002\u3067\u3001WordPress\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u4e45\u3057\u3076\u308a\u306b\u884c\u3063\u305f\u3068\u3053\u308d\u3001\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306a\u308b\u3082\u306e\u306bPHP\u304c\u53e4\u3044\u304b\u3089\u65b0\u3057\u304f\u3057\u308d\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3042\u3042\u305d\u3046\u3067\u3059\u304b\u3001\u3068\u601d\u3044\u8abf\u3079\u305f\u3089\u30d0\u30fc\u30b8\u30e7\u30f35.6\u3092\u4f7f\u3063\u3066\u304a\u308a\u30b5\u30dd\u30fc\u30c8\u3082\u7d42\u4e86\u3057\u3066\u3044\u305f\u3002\u305d\u308a\u3083\u30c0\u30e1\u306d\u3068\u8efd\u3044\u6c17\u6301\u3061\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u3057\u3066\u304b\u3089WordPress\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u300c\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u300d\u306a\u3069\u3068\u3044\u307e\u307e\u3067\u898b\u305f\u3053\u3068\u306e\u306a\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u3060\u3051\u304c\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u3066\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u5168\u304f\u898b\u3089\u308c\u306a\u3044\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u518d\u8d77\u52d5\u3057\u3066\u3082\u56de\u5fa9\u306f\u3057\u306a\u3044\u3002\u3044\u3064\u3082\u306a\u3089\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u3063\u3066\u304b\u3089\u4f5c\u696d\u3059\u308b\u306e\u3060\u304c\u3001\u4eca\u56de\u306b\u9650\u3063\u3066\u30b5\u30dc\u3063\u3066\u3057\u307e\u3063\u305f\u305b\u3044\u3067\u7d50\u69cb\u7126\u3063\u3066\u3057\u307e\u3063\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3044\u3084\u3001\u3053\u3093\u306a\u6642\u3053\u305d\u843d\u3061\u7740\u304b\u306d\u3070\u3068\u5c0f\u4e00\u6642\u9593\u307b\u3069\u653e\u7f6e\u3057\u3066\u304b\u3089\u30ed\u30b0\u3092\u8abf\u3079\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u554f\u984c\u70b9\uff11\uff0e<\/p>\n\n\n\n<p>\/var\/log\/httpd\/error.log\u306b\u306f\u300cPHP Fatal error\uff1aArray and string offset access syntax with curly braces is no longer supported\u300d\u3068\u8a18\u9332\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p>Syntax \u30a8\u30e9\u30fc\u3060\u3068\u3002\u3002\u305d\u3093\u306a\u99ac\u9e7f\u306a\u3002\u3002\u5185\u5bb9\u306f\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3060\u304c\u3001\u8abf\u3079\u3066\u307f\u308b\u3068PHP\u306e\u914d\u5217\u30a2\u30af\u30bb\u30b9\u306b{}\u304c\u4f7f\u3048\u306a\u304f\u306a\u3063\u305f\u3068\u306e\u3053\u3068\u3002\u4f7f\u3063\u3066\u3044\u308bWordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306b{}\u3092\u4f7f\u3063\u305f\u914d\u5217\u30a2\u30af\u30bb\u30b9\u304c\u3042\u3063\u305f\u3088\u3046\u3060\u3063\u305f\u3002\u5e78\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f1\u304b\u6240\u3060\u3051\u4fee\u6b63\u3059\u308b\u3068\u3053\u306e\u30a8\u30e9\u30fc\u306f\u6d88\u3048\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u554f\u984c\u70b9\uff12\uff0e<\/p>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u3067\u554f\u984c\u306f\u7d42\u308f\u3089\u306a\u304b\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u6b21\u306a\u308b\u30a8\u30e9\u30fc\u306f\u300cPHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function\uff5e\u300d<\/p>\n\n\n\n<p>\u8abf\u3079\u3066\u307f\u308b\u3068WordPress\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u7f6e\u304d\u63db\u308f\u3063\u305f\u95a2\u6570\u306e\u5f15\u6570\u304c\u5909\u308f\u3063\u305f\u3088\u3046\u3067\u3001\u4f7f\u3063\u3066\u3044\u308b\u30c6\u30fc\u30de\u304b\u3089\u6e21\u3055\u308c\u3066\u3044\u308b\u5f15\u6570\u306e\u6570\u304c\u5c11\u306a\u304f\u3066\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002\u3053\u3093\u306a\u306e\u76f4\u3059\u306e\u3057\u3093\u3069\u3044\u3088\u3002\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u540c\u3058\u30c6\u30fc\u30de\u306e\u6700\u65b0\u7248\u304cGitHub\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u5165\u624b\u3057\u3066\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3054\u3068\u7f6e\u304d\u63db\u3048\u305f\u3002\u3053\u308c\u3067\u3053\u306e\u554f\u984c\u306f\u89e3\u6c7a\u3057\u3066\u6295\u7a3f\u8a18\u4e8b\u3092\u898b\u3089\u308c\u308b\u72b6\u614b\u306b\u306f\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u554f\u984c\u70b9\uff13\uff0e<\/p>\n\n\n\n<p>\u3060\u304c\u3001\u305d\u308c\u3067\u3082\u554f\u984c\u306f\u7d42\u308f\u3089\u306a\u304b\u3063\u305f\u3002\u7ba1\u7406\u7528\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3084\u306f\u308a\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u305f\u3002\u3053\u308c\u306f\u7ba1\u7406\u7528\u30b5\u30a4\u30c8\u3067\u4f7f\u3063\u3066\u3044\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u3066\u3044\u305f\u3002Search Regex\u3068\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u3060\u3002\u3069\u3046\u3084\u3089\uff30\uff28\uff30\u3067\u9759\u7684\u306b\u5ba3\u8a00\u3055\u308c\u3066\u3044\u306a\u3044\u95a2\u6570\u3092\u9759\u7684\u95a2\u6570\u306e\u3088\u3046\u306b\u547c\u3076\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3088\u3046\u306b\u53b3\u683c\u306b\u30c1\u30a7\u30c3\u30af\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3060\u3002\u3053\u3061\u3089\u306f\u554f\u984c2\u3068\u9055\u3063\u3066\u6700\u65b0\u7248\u3067\u3082\u4fee\u6b63\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u60c5\u5831\u3092\u898b\u305f\u306e\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u305d\u306e\u3082\u306e\u3092\u524a\u9664\u3057\u3066\u5bfe\u5fdc\u3057\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3053\u3046\u3057\u3066\u4f55\u3060\u304b\u3093\u3060\u3067\u5fa9\u6d3b\u3057\u305f\u306e\u3067\u3064\u3044\u3067\u306b\u66f8\u304d\u8fbc\u307f\u3057\u3066\u307f\u305f\u6b21\u7b2c\u3067\u3042\u3063\u305f\u304c\u3001\u666e\u6bb5\uff30\uff28\uff30\u3092\u4f7f\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3053\u3093\u306a\u306b\u5909\u66f4\u304c\u3042\u3063\u305f\u306e\u3092\u77e5\u3089\u306a\u304b\u3063\u305f\u3002PHP\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u4fdd\u5b88\u3057\u3066\u3044\u308b\u4eba\u305f\u3061\u306b\u306f\u885d\u6483\u3060\u3063\u305f\u3093\u3060\u308d\u3046\u306a\u3042\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3068\u66f8\u304d\u7d42\u3048\u305f\u3068\u3053\u308d\u3067\u3001\u5de6\u4e0a\u306eCount Per Day\u306e\u898b\u51fa\u3057\u3068\u6570\u5b57\u304c\u9006\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u3044\u305f\u3002\u305d\u306e\u3046\u3061\u76f4\u3057\u305f\u3044\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>P.S.<\/p>\n\n\n\n<p>\u76f4\u3057\u307e\u3057\u305f\u3088\u3063\u3068\u3002\u3067\u3082\u306a\u3093\u304b\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u304c\u8aad\u3081\u3066\u306a\u3044\u3002\u3053\u308c\u307e\u305f\u305d\u306e\u3046\u3061\u76f4\u3057\u305f\u3044\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# pwd\n\/var\/www\/html\/blog\/wp-content\/plugins\/count-per-day\n\n# diff counter.php.bk counter.php\n1446a1447\n&gt;                                               echo __($instance&#x5B;$k.'_name']).':';\n1454c1455\n&amp;lt;                                               echo '&amp;lt;\/span&gt;'.__($instance&#x5B;$k.'_name']).':&amp;lt;\/li&gt;';\n---\n&gt;                                               echo '&amp;lt;\/span&gt;&amp;lt;\/li&gt;';\n<\/pre><\/div>\n\n\n<p>\u4fee\u6b63\u524d<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n                                        if ( ($k == 'show' &amp;&amp; is_singular()) || $k != 'show' )\n                                        {\n                                                $f = str_replace( $this-&gt;funcs, $this-&gt;cpd_funcs, $k );\n                                                echo '&lt;li class=&quot;cpd-l&quot;&gt;';\n                                                echo '&lt;span id=&quot;cpd_number_'.$k.'&quot; class=&quot;cpd-r&quot;&gt;';\n                                                \/\/ parameters only for special functions\n                                                if ( $f == 'getUserPerDay' )\n                                                        echo $count_per_day-&gt;getUserPerDay($count_per_day-&gt;options&#x5B;'dashboard_last_days']);\n                                                else if ( $f == 'show' )\n                                                        echo $count_per_day-&gt;show('', '', false, false);\n                                                else\n                                                        echo call_user_func( array(&amp;$count_per_day, $f) );\n                                                echo '&lt;\/span&gt;'.__($instance&#x5B;$k.'_name']).':&lt;\/li&gt;';\n                                        }\n<\/pre><\/div>\n\n\n<p>\u4fee\u6b63\u5f8c<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; highlight: [6,14]; title: ; notranslate\" title=\"\">\n                                        if ( ($k == 'show' &amp;&amp; is_singular()) || $k != 'show' )\n                                        {\n                                                $f = str_replace( $this-&gt;funcs, $this-&gt;cpd_funcs, $k );\n                                                echo '&lt;li class=&quot;cpd-l&quot;&gt;';\n                                                echo '&lt;span id=&quot;cpd_number_'.$k.'&quot; class=&quot;cpd-r&quot;&gt;';\n                                                echo __($instance&#x5B;$k.'_name']).':';\n                                                \/\/ parameters only for special functions\n                                                if ( $f == 'getUserPerDay' )\n                                                        echo $count_per_day-&gt;getUserPerDay($count_per_day-&gt;options&#x5B;'dashboard_last_days']);\n                                                else if ( $f == 'show' )\n                                                        echo $count_per_day-&gt;show('', '', false, false);\n                                                else\n                                                        echo call_user_func( array(&amp;$count_per_day, $f) );\n                                                echo '&lt;\/span&gt;&lt;\/li&gt;';\n                                        }\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30d6\u30ed\u30b0\u306fWordPress\u3067\u52d5\u3044\u3066\u3044\u308b\u3002\u3067\u3001WordPress\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u4e45\u3057\u3076\u308a\u306b\u884c\u3063\u305f\u3068\u3053\u308d\u3001\u30d8\u30eb\u30b9\u30c1\u30a7\u30c3\u30af\u306a\u308b\u3082\u306e\u306bPHP\u304c\u53e4\u3044\u304b\u3089\u65b0\u3057\u304f\u3057\u308d\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3044\u305f\u3002 \u3042\u3042\u305d\u3046\u3067\u3059\u304b\u3001\u3068\u601d\u3044\u8abf\u3079\u305f\u3089 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=400"}],"version-history":[{"count":10,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":414,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions\/414"}],"wp:attachment":[{"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dracula.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}