#16565 closed defect (bug) (worksforme)
Several E_NOTICE when using IXR_Client
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0.5 |
| Severity: | normal | Keywords: | |
| Cc: | me@… |
Description (last modified by nacin)
POST /xmlrpc.php HTTP/1.0
Host: foobar.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library -- WordPress/3.0.5
Content-Length: 281
<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param><value><string>http://foo.com/</string></value></param>
<param><value><string>http://bar.com/</string></value></param>
</params></methodCall>
HTTP/1.1 200 OK
Date: Tue, 15 Feb 2011 07:28:38 GMT
Server: Apache/2.2.16
X-Powered-By: PHP/5.3.5
Connection: close
Content-Type: text/html
<br />
<b>Notice</b>: Undefined index: path in <b>/wp-includes/rewrite.php</b> on line <b>302</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/wp-includes/rewrite.php</b> on line <b>341</b><br />
<br />
<b>Notice</b>: Undefined index: HTTP_REFERER in <b>/wp-content/plugins/akismet/akismet.php</b> on line <b>300</b><br />
<br />
<b>Notice</b>: Undefined index: user_ID in <b>/wp-content/plugins/akismet/akismet.php</b> on line <b>306</b><br />
<br />
<b>Notice</b>: Undefined index: comment_author_email in <b>/wp-includes/comment.php</b> on line <b>1200</b><br />
<br />
<b>Notice</b>: Undefined index: comment_author_email in <b>/wp-content/plugins/akismet/akismet.php</b> on line <b>262</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /wp-includes/rewrite.php:302) in <b>/wp-includes/class-IXR.php</b> on line <b>395</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /wp-includes/rewrite.php:302) in <b>/wp-includes/class-IXR.php</b> on line <b>396</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /wp-includes/rewrite.php:302) in <b>/wp-includes/class-IXR.php</b> on line <b>397</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /wp-includes/rewrite.php:302) in <b>/wp-includes/class-IXR.php</b> on line <b>398</b><br />
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string>Pingback from http://foo.com/ to http://bar.com/ registered. Keep the web talking! :-)</string>
</value>
</param>
</params>
</methodResponse
Attachments (2)
Change History (12)
- Description modified (diff)
- Keywords reporter-feedback removed
- Severity changed from major to normal
Undefined index: path in /wp-includes/rewrite.php on line 302
That one is legitimate. The rest are possibly akismet. Not sure what would cause line 341. (fyi, on 3.0.5 tag.)
home_url() is not trailing-slashed. That means that parse_url() won't set a path.
Changing home_url() to home_url('/') fixes this. There are possibly other instances in the codebase where we parse_url() home_url().
comment:3
solarissmoke — 2 years ago
The undefined index is fixed in [16069]
line 341 is fixed in [16872]
- Description modified (diff)
I don't see how [16877] fixes anything. It uses cleaner code, but is_singular == is_single || is_page. (There's also an is_attachment there, but whenever is_attachment is true, is_single xor is_page is true.)
comment:7
tillkruess — 2 years ago
I attached patch to fix the E_NOTICEs in Akismet and one for comments.php.
I also just saw, that the WordPress trunk already contains all fixes for the E_NOTICEs in "rewrite.php".
comment:8
tillkruess — 2 years ago
- Cc me@… added
comment:9
solarissmoke — 2 years ago
- Resolution set to worksforme
- Status changed from new to closed
Just tested - all the notices issued by core don't appear in trunk any more. For the Akismet ones - please report to Automattic.
comment:10
dd32 — 2 years ago
- Milestone Awaiting Review deleted
Akismet issues can be reported on the plugins trac: http://plugins.trac.wordpress.org/newticket?component=akismet

Can't reproduce this in trunk..
this is the code I've used
include('IXR_Library.php'); $client = new IXR_Client('http://localhost.local/xmlrpc.php'); $client->debug = true; $client->query('pingback.ping' ,'http://localhost/', 'http://localhost.local/2011/02/hello-world/');response
POST /xmlrpc.php HTTP/1.0 Host: localhost.local Content-Type: text/xml User-Agent: The Incutio XML-RPC PHP Library Content-Length: 259 <?xml version="1.0"?> <methodCall> <methodName>pingback.ping</methodName> <params> <param><value><string>http://localhost/</string></value></param> <param><value><string>http://localhost.local/blog/2011/02/hello-world/</string></value></param> </params></methodCall> HTTP/1.1 200 OK Date: Tue, 15 Feb 2011 09:32:32 GMT Server: Apache/2.2.17 X-Powered-By: PHP/5.3.4 Connection: close Content-Length: 281 Content-Type: text/xml <?xml version="1.0"?> <methodResponse> <params> <param> <value> <string>Pingback from http://localhost/ to http://localhost.local/blog/2011/02/hello-world/ registered. Keep the web talking! :-)</string> </value> </param> </params> </methodResponse>maybe a plugin issue?