{"id":11405,"date":"2026-03-17T17:56:24","date_gmt":"2026-03-17T08:56:24","guid":{"rendered":"https:\/\/code-plus.jp\/gp\/?p=11405"},"modified":"2026-03-17T18:17:44","modified_gmt":"2026-03-17T09:17:44","slug":"php-errorlog-11405","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/php-errorlog-11405\/","title":{"rendered":"PHP7\u2192PHP8\u306b\u4e0a\u3052\u305f\u3089error.log\u304c\u5897\u3048\u305f\u3002\u307e\u305a\u4f55\u3092\u3059\u3079\u304d\u304b\u3010WordPress\u3011"},"content":{"rendered":"<!-- \r\ntitle:PHP7\u2192PHP8\u306b\u4e0a\u3052\u305f\u3089error.log\u304c\u5897\u3048\u305f\u3002\u307e\u305a\u4f55\u3092\u3059\u3079\u304d\u304b\u3010WordPress\u3011\r\ndescription:PHP7.4\u304b\u3089PHP8\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u306berror.log\u304c\u6025\u5897\u3059\u308b\u539f\u56e0\u3068\u3001\u6700\u521d\u306b\u3084\u308b\u3079\u304d\u5bfe\u51e6\u306e\u6d41\u308c\u3092\u89e3\u8aac\u3002sort -u\u3067\u30ed\u30b0\u3092\u30e6\u30cb\u30fc\u30af\u5316\u3059\u308b\u65b9\u6cd5\u3001Fatal\u3068Warning\u306e\u512a\u5148\u9806\u4f4d\u306e\u5224\u65ad\u306a\u3069\u3001WordPress\u30c6\u30fc\u30de\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3044\u308b\u30ec\u30d9\u30eb\u306e\u65b9\u5411\u3051\u306b\u5b9f\u4f53\u9a13\u3092\u3082\u3068\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002\r\ntags:PHP, PHP8, PHP7, WordPress, error.log, \u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7, PHP\u30a8\u30e9\u30fc, Warning, Fatal Error, WordPress\u79fb\u884c -->\r\n\r\n<p>PHP7.4 \u2192 PHP8.x \u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001\u30b5\u30fc\u30d0\u30fc\u306e <code>error.log<\/code> \u306b\u898b\u305f\u3053\u3068\u306e\u306a\u3044Warning\u3084Fatal Error\u304c\u5927\u91cf\u306b\u51fa\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u2500\u2500\u3068\u3044\u3046\u7d4c\u9a13\u3092\u3057\u305f\u65b9\u3082\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\r\n<p class=\"mt-1r\">PHP8\u3067\u306e\u6700\u5927\u306e\u5909\u5316\u306f\u3001\u300c\u3053\u308c\u307e\u3067\u898b\u3066\u898b\u306c\u3075\u308a\u3092\u3057\u3066\u3044\u305f\u3082\u306e\u3092\u3001\u304d\u3061\u3093\u3068\u30a8\u30e9\u30fc\u306b\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u300d\u3068\u3044\u3046\u70b9\u3067\u3059\u3002PHP7.x\u3067\u306f\u300c\u3061\u3087\u3063\u3068\u304a\u304b\u3057\u3044\u3051\u3069\u52d5\u304f\u300d\u30b3\u30fc\u30c9\u304c\u3001PHP8.x\u3067\u306f\u300c\u304a\u304b\u3057\u3044\u306e\u3067\u304d\u3061\u3093\u3068\u6b62\u3081\u308b\u300d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\r\n<p class=\"mt-1r\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u300c\u307e\u305a\u4f55\u3092\u78ba\u8a8d\u3057\u3066\u3001\u3069\u3046\u5bfe\u51e6\u3059\u308b\u304b\u300d\u306e\u6d41\u308c\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\r\n\r\n<!-- \u2605\u76ee\u6b21\u30ea\u30b9\u30c8 -->\r\n<ul class=\"tocList mt-1r\" data-toc-id=\"js-tocBWGD\"><\/ul>\r\n<ins class=\"tocBtn is-fixed\" data-toc-id=\"js-tocBWGD\"><\/ins>\r\n<!-- \u76ee\u6b21\uff1aJS -->\r\n<script src=\"https:\/\/code-plus.jp\/cdn\/js\/_gimmicks\/inppend-tocList.js\"><\/script>\r\n<script src=\"https:\/\/code-plus.jp\/cdn\/js\/_gimmicks\/inppend-tocBtn.js\"><\/script>\r\n\r\n\r\n\r\n\r\n<hr class=\"separator mt-3r\">\r\n\r\n<h2 class=\"fz-xl\">\u306a\u305cPHP8\u306b\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u5897\u3048\u308b\u306e\u304b<\/h2>\r\n<h3 class=\"fz-ml\">\u2460 \u672a\u5b9a\u7fa9\u306e\u5909\u6570\u30fb\u914d\u5217\u30ad\u30fc\u304c <code>Notice<\/code> \u2192 <code>Warning<\/code> \u306b\u683c\u4e0a\u3052<\/h3>\r\n<p>PHP7.x\u307e\u3067\u306f\u300c\u672a\u5b9a\u7fa9\u306e\u5909\u6570\u3092\u4f7f\u3063\u305f\u300d\u300c\u5b58\u5728\u3057\u306a\u3044\u914d\u5217\u306e\u30ad\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u300d\u3068\u3044\u3046\u64cd\u4f5c\u306f <code>Notice<\/code>\uff08\u901a\u77e5\uff09\u3067\u3057\u305f\u3002\u753b\u9762\u306b\u306f\u4f55\u3082\u51fa\u305a\u3001\u30ed\u30b0\u306b\u3082\u3055\u307b\u3069\u6b8b\u3089\u306a\u3044\u30b1\u30fc\u30b9\u304c\u591a\u304b\u3063\u305f\u3067\u3059\u3002<\/p>\r\n<p>PHP8.0\u4ee5\u964d\u306f\u3053\u308c\u304c <code>Warning<\/code>\uff08\u8b66\u544a\uff09\u306b\u683c\u4e0a\u3052\u3055\u308c\u3001\u30a8\u30e9\u30fc\u30ed\u30b0\u306b\u304d\u3063\u3061\u308a\u8a18\u9332\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\r\n<h3 class=\"fz-ml\">\u2461 <code>bool<\/code> \u578b\u3078\u306e\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u304c\u975e\u63a8\u5968\u306b<\/h3>\r\n<p><code>get_post_meta()<\/code> \u306a\u3069\u3001\u5931\u6557\u6642\u306b <code>false<\/code> \u3092\u8fd4\u3059\u95a2\u6570\u306e\u623b\u308a\u5024\u306b\u5bfe\u3057\u3066 <code>$value++<\/code> \u3092\u3059\u308b\u3068\u3001PHP8.3\u4ee5\u964d\u3067 <code>Deprecated: Increment on type bool<\/code> \u3068\u3044\u3046\u8b66\u544a\u304c\u51fa\u307e\u3059\u3002PHP7.x\u3067\u306f\u4f55\u3082\u8a00\u308f\u308c\u306a\u304b\u3063\u305f\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">\u2462 \u578b\u30c1\u30a7\u30c3\u30af\u304c\u53b3\u5bc6\u306b\u306a\u308a\u3001\u5834\u5408\u306b\u3088\u3063\u3066Fatal Error\u306b<\/h3>\r\n<p>PHP7.x\u3067\u306f\u300c\u6587\u5b57\u5217\u3092\u6e21\u3059\u3079\u304d\u95a2\u6570\u306b\u914d\u5217\u3092\u6e21\u3057\u3066\u3082\u6697\u9ed9\u7684\u306b\u5909\u63db\u3057\u3066\u52d5\u304f\u300d\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3057\u305f\u3002PHP8.x\u3067\u306f\u3053\u308c\u304c <code>Fatal Error<\/code>\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u505c\u6b62\u3059\u308b\u30a8\u30e9\u30fc\uff09\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\r\n\r\n<hr class=\"separator mt-3r\">\r\n\r\n<h3 class=\"fz-ml\">\u30a8\u30e9\u30fc\u30ed\u30b0\u306e\u8aad\u307f\u65b9<\/h3>\r\n<p>error.log\u306e\u5404\u884c\u306f\u6b21\u306e\u3088\u3046\u306a\u5f62\u5f0f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-\">&lsqb;17-Mar-2026 12:34:56 UTC&rsqb; PHP Warning: Undefined array key &quot;post&quot; in \/home\/user\/public_html\/wp-content\/themes\/mytheme\/functions.php on line 976\r\n<\/code><\/pre>\r\n<table class=\"table my-0.5r\">\r\n  <thead>\r\n    <tr class=\"rung\">\r\n      <th>\u9805\u76ee<\/th>\r\n      <td>\u5185\u5bb9<\/td>\r\n    <\/tr>\r\n  <\/thead>\r\n  <tbody>\r\n    <tr class=\"rung\">\r\n      <th><code>PHP Warning<\/code><\/th>\r\n      <td>\u30a8\u30e9\u30fc\u306e\u7a2e\u5225\uff08Warning \/ Fatal error \/ Deprecated \u306a\u3069\uff09<\/td>\r\n    <\/tr>\r\n    <tr class=\"rung\">\r\n      <th><code>Undefined array key &quot;post&quot;<\/code><\/th>\r\n      <td>\u30a8\u30e9\u30fc\u306e\u5185\u5bb9<\/td>\r\n    <\/tr>\r\n    <tr class=\"rung\">\r\n      <th><code>functions.php on line 976<\/code><\/th>\r\n      <td>\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u884c\u756a\u53f7<\/td>\r\n    <\/tr>\r\n  <\/tbody>\r\n<\/table>\r\n<p>\u307e\u305a\u30a8\u30e9\u30fc\u306e\u7a2e\u5225\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\r\n<ul style=\"list-style-type:bullet;\" class=\"my-0.5r\">\r\n  <li><b class=\"bold\">Fatal error<\/b> \u2192 \u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u505c\u6b62\u3002\u6700\u512a\u5148\u3067\u5bfe\u51e6<\/li>\r\n  <li><b class=\"bold\">Warning<\/b> \u2192 \u52d5\u3044\u3066\u3044\u308b\u304c\u554f\u984c\u3042\u308a\u3002\u9806\u6b21\u5bfe\u51e6<\/li>\r\n  <li><b class=\"bold\">Deprecated<\/b> \u2192 \u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u524a\u9664\u4e88\u5b9a\u3002\u5bfe\u51e6\u63a8\u5968<\/li>\r\n  <li><b class=\"bold\">Notice<\/b> \u2192 \u8efd\u5fae\u306a\u554f\u984c\u3002\u4f59\u88d5\u304c\u3042\u308c\u3070\u5bfe\u51e6<\/li>\r\n<\/ul>\r\n\r\n<hr class=\"separator mt-3r\">\r\n\r\n<h2 class=\"fz-xl\">\u3088\u304f\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u3068\u5bfe\u51e6\u6cd5<\/h2>\r\n<h3 class=\"fz-ml\"><span>\u2460 \u3088\u304f\u51fa\u308bWarning<\/span><\/h3>\r\n<ul style=\"list-style-type:bullet;\" class=\"my-0.5r\">\r\n  <li><code>$post-&gt;post_name<\/code> on null<\/li>\r\n  <li><code>get_post_meta()<\/code> \u306e\u623b\u308a\u5024\u306b <code>++<\/code> \u3092\u3057\u305f\u3068\u304d\u306e bool increment<\/li>\r\n  <li><code>foreach()<\/code> \u306b null \u3092\u6e21\u3057\u305f\u3068\u304d\u306eWarning<\/li>\r\n  <li><code>$_GET&lsqb;&#39;post&#39;&rsqb;<\/code> \u306a\u3069\u5b58\u5728\u3057\u306a\u3044\u914d\u5217\u30ad\u30fc\u3078\u306e\u30a2\u30af\u30bb\u30b9<\/li>\r\n  <li><code>if-elseif-else<\/code> \u306e\u5168\u5206\u5c90\u3067\u5909\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u554f\u984c<\/li>\r\n<\/ul>\r\n\r\n<a href=\"https:\/\/code-plus.jp\/gp\/php8-warning-11409\/\" class=\"linkbox my-1.5r\">\r\n<h4 class=\"linkbox-title fz-md\">PHP8\u79fb\u884c\u3067WordPress\u30c6\u30fc\u30de\u306b\u51fa\u308bWarning 5\u30d1\u30bf\u30fc\u30f3\u3068\u4fee\u6b63\u30b3\u30fc\u30c9\u3010\u5b9f\u4f8b\u4ed8\u304d\u3011<\/h4>\r\n<picture class=\"linkbox-thumbnail\">\r\n<img decoding=\"async\" width=\"300\" height=\"200\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/7d1dec178674388d0e81629e134794f6.jpg?ver=20260317181744\" alt=\"PHP8\u79fb\u884c\u3067WordPress\u30c6\u30fc\u30de\u306b\u51fa\u308bWarning 5\u30d1\u30bf\u30fc\u30f3\u3068\u4fee\u6b63\u30b3\u30fc\u30c9\u3010\u5b9f\u4f8b\u4ed8\u304d\u3011\" loading=\"lazy\" \/>\r\n<\/picture>\r\n<span class=\"linkbox-excerpt\">PHP7\u2192PHP8\u3078\u306e\u79fb\u884c\u5f8c\u306bWordPress\u30c6\u30fc\u30de\u3067\u5b9f\u969b\u306b\u767a\u751f\u3057\u305fPHP Warning 5\u7a2e\u985e\u3092\u3001before\/after\u306e\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u89e3\u8aac\u3002$post\u306enull\u30c1\u30a7\u30c3\u30af\u30fbget_post_meta()\u306efalse\u5bfe\u5fdc\u30fbforeach\u306enull\u5f15\u6570\u30fb$_...\r\n&emsp;<u class=\"linkbox-more\">\u7d9a\u304d\u3092\u8aad\u3080<\/u>\r\n<\/span>\r\n<\/a>\r\n\r\n<h3 class=\"fz-ml\"><span>\u2461 Fatal Error\u3068\u30a8\u30e9\u30fc\u306e\u9023\u9396<\/span><\/h3>\r\n<ul style=\"list-style-type:bullet;\" class=\"my-0.5r\">\r\n  <li><code>get_page_by_path()<\/code> \u306b\u914d\u5217\u3092\u6e21\u3057\u3066Fatal Error\uff08PHP8\u306e\u578b\u53b3\u683c\u5316\uff09<\/li>\r\n  <li>\u30d5\u30a1\u30a4\u30eb\u306einclude\u5931\u6557\u304csession_start\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3059\u9023\u9396\u69cb\u9020<\/li>\r\n  <li>\u30c6\u30fc\u30de\u8907\u88fd\u6642\u306b\u8d77\u304d\u3084\u3059\u3044\u300c\u66f4\u65b0\u6f0f\u308c\u300d\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/li>\r\n<\/ul>\r\n\r\n<a href=\"https:\/\/code-plus.jp\/gp\/php8-fatalerror-11413\/\" class=\"linkbox my-1.5r\">\r\n<h4 class=\"linkbox-title fz-md\">WordPress\u30c6\u30fc\u30de\u306eFatal Error\u3068\u30a8\u30e9\u30fc\u306e\u9023\u9396\u69cb\u9020\u3092\u76f4\u3059\u3010PHP7\u2192PHP8\u79fb\u884c\u3011<\/h4>\r\n<picture class=\"linkbox-thumbnail\">\r\n<img decoding=\"async\" width=\"300\" height=\"200\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/d952261dd53f8972565cf5900dee58a1.jpg?ver=20260317181744\" alt=\"WordPress\u30c6\u30fc\u30de\u306eFatal Error\u3068\u30a8\u30e9\u30fc\u306e\u9023\u9396\u69cb\u9020\u3092\u76f4\u3059\u3010PHP7\u2192PHP8\u79fb\u884c\u3011\" loading=\"lazy\" \/>\r\n<\/picture>\r\n<span class=\"linkbox-excerpt\">PHP8\u79fb\u884c\u5f8c\u306bWordPress\u304c\u771f\u3063\u767d\u306b\u306a\u308bFatal Error\u306e\u539f\u56e0\u3068\u4fee\u6b63\u65b9\u6cd5\u3092\u5b9f\u4f8b\u3067\u89e3\u8aac\u3002get_page_by_path()\u3078\u306e\u914d\u5217\u6e21\u3057\u554f\u984c\u3001include\u306e\u5931\u6557\u304csession_start\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3059\u9023\u9396\u69cb\u9020\u306e\u3057\u304f\u307f\u3001\u30c6\u30fc\u30de\u8907\u88fd\u6642\u306b\u8d77\u304d\u3084\u3059...\r\n&emsp;<u class=\"linkbox-more\">\u7d9a\u304d\u3092\u8aad\u3080<\/u>\r\n<\/span>\r\n<\/a>","protected":false},"excerpt":{"rendered":"PHP7.4\u304b\u3089PHP8\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u306berror.log\u304c\u6025\u5897\u3059\u308b\u539f\u56e0\u3068\u3001\u6700\u521d\u306b\u3084\u308b\u3079\u304d\u5bfe\u51e6\u306e\u6d41\u308c\u3092\u89e3\u8aac\u3002sort -u\u3067\u30ed\u30b0\u3092\u30e6\u30cb\u30fc\u30af\u5316\u3059\u308b\u65b9\u6cd5\u3001Fatal\u3068Warning\u306e\u512a\u5148\u9806\u4f4d\u306e\u5224\u65ad\u306a\u3069\u3001WordPress\u30c6\u30fc\u30de\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3044\u308b\u30ec\u30d9\u30eb\u306e\u65b9\u5411\u3051\u306b\u5b9f\u4f53\u9a13\u3092\u3082\u3068\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002","protected":false},"author":1,"featured_media":11407,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[776,777,775,772,773,774,778,173,102,111],"class_list":{"0":"post-11405","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress","8":"tag-php","9":"tag-fatal-error","10":"tag-775","11":"tag-php8","12":"tag-php7","13":"tag-error-log","14":"tag-wordpress","15":"tag-warning"},"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/11405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=11405"}],"version-history":[{"count":6,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/11405\/revisions"}],"predecessor-version":[{"id":11420,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/11405\/revisions\/11420"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media\/11407"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=11405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=11405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=11405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}