質問編集履歴
4
エラーの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -180,4 +180,18 @@
|
|
180
180
|
|
181
181
|
|
182
182
|
|
183
|
-
|
183
|
+
ありがとうございます。
|
184
|
+
|
185
|
+
```PHP
|
186
|
+
|
187
|
+
ini_set( 'display_errors', 1 );
|
188
|
+
|
189
|
+
```
|
190
|
+
|
191
|
+
をfunctions.phpに追記したところ、wp-includes/functions.phpのHTMLに下記のようなエラーが出ました。
|
192
|
+
|
193
|
+
```ここに言語を入力
|
194
|
+
|
195
|
+
Fatal error: require(): Failed opening required 'ABSPATHWPINC/option.php' (include_path='.:/usr/local/php/5.4/lib/php') in /home/purekanpou/www/wp-includes/functions.php on line 20
|
196
|
+
|
197
|
+
```
|
3
コード部分の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -132,6 +132,8 @@
|
|
132
132
|
|
133
133
|
### 試したこと
|
134
134
|
|
135
|
+
```PHP
|
136
|
+
|
135
137
|
<?php
|
136
138
|
|
137
139
|
/**
|
@@ -162,6 +164,10 @@
|
|
162
164
|
|
163
165
|
/**
|
164
166
|
|
167
|
+
```
|
168
|
+
|
169
|
+
|
170
|
+
|
165
171
|
を、functions.php内に設置
|
166
172
|
|
167
173
|
|
2
コードを修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,11 +30,15 @@
|
|
30
30
|
|
31
31
|
```
|
32
32
|
|
33
|
-
エラーメッセージ
|
34
|
-
|
35
33
|
Notice: register_sidebar が誤って呼び出されました。「サイドバー 1」サイドバーの引数の配列で id が設定されませんでした。既定では「sidebar-1」です。id に「sidebar-1」を設定することでこの情報を消して、既存のサイドバーのコンテンツを保つことができます。 詳細は WordPress のデバッグをご覧ください。 (このメッセージはバージョン 4.2.0 で追加されました) in /home/purekanpou/www/wp-includes/functions.php on line 3573
|
36
34
|
|
35
|
+
```
|
37
36
|
|
37
|
+
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
```
|
38
42
|
|
39
43
|
Warning: Cannot modify header information - headers already sent by (output started at /home/purekanpou/www/wp-config.php:1) in /home/purekanpou/www/wp-includes/pluggable.php on line 1196
|
40
44
|
|
@@ -42,13 +46,13 @@
|
|
42
46
|
|
43
47
|
|
44
48
|
|
49
|
+
|
50
|
+
|
45
51
|
### 該当のソースコード
|
46
52
|
|
47
|
-
|
53
|
+
これは自分で追加した文になります。
|
48
54
|
|
49
|
-
|
55
|
+
```PHP
|
50
|
-
|
51
|
-
【これは自分で追加したものです。最上部においてあります。】
|
52
56
|
|
53
57
|
<?php
|
54
58
|
|
@@ -82,7 +86,13 @@
|
|
82
86
|
|
83
87
|
```
|
84
88
|
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
|
85
|
-
|
95
|
+
```PHP
|
86
96
|
|
87
97
|
if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
|
88
98
|
|
@@ -109,6 +119,12 @@
|
|
109
119
|
}
|
110
120
|
|
111
121
|
/**
|
122
|
+
|
123
|
+
```
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
112
128
|
|
113
129
|
|
114
130
|
|
@@ -150,7 +166,7 @@
|
|
150
166
|
|
151
167
|
|
152
168
|
|
153
|
-
|
169
|
+
|
154
170
|
|
155
171
|
|
156
172
|
|
1
乗せるコードが違っていたので変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,33 +82,31 @@
|
|
82
82
|
|
83
83
|
```
|
84
84
|
|
85
|
-
|
85
|
+
【エラーがありますと言われているのが下記の部分です】
|
86
86
|
|
87
|
-
|
87
|
+
if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
|
88
88
|
|
89
|
-
|
89
|
+
if ( function_exists( '__' ) ) {
|
90
90
|
|
91
|
-
|
91
|
+
$version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
|
92
92
|
|
93
|
-
|
93
|
+
$message .= ' ' . __( 'Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
|
94
94
|
|
95
|
-
|
95
|
+
trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
|
96
96
|
|
97
|
+
} else {
|
97
98
|
|
99
|
+
$version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version );
|
98
100
|
|
99
|
-
|
101
|
+
$message .= ' Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.';
|
100
102
|
|
101
|
-
'
|
103
|
+
trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
|
102
104
|
|
103
|
-
|
105
|
+
}
|
104
106
|
|
105
|
-
|
107
|
+
}
|
106
108
|
|
107
109
|
}
|
108
|
-
|
109
|
-
?>
|
110
|
-
|
111
|
-
<?php
|
112
110
|
|
113
111
|
/**
|
114
112
|
|