Opened 15 years ago
Closed 15 years ago
#1214 closed defect (bug) (fixed)
XML-RPC array_merge warning
Reported by: | timskii | Owned by: | chrishajer |
---|---|---|---|
Milestone: | 1.0.3 | Priority: | normal |
Severity: | major | Version: | 1.0.2 |
Component: | Back-end | Keywords: | has-patch tested |
Cc: | gautam.2011@… |
Description
With pingback enabled, a PHP warning is logged:
array_merge() [function.array-merge]: Argument #1 is not an array in ..forums/xmlrpc.php on line 164
Part of BB_XMLRPC_Server() . Probably only an issue for PHP 5, which no longer accepts non-arrays in array_merge(). I assume $this->methods isn't supposed to be an array.
Attachments (1)
Change History (8)
#2
@
15 years ago
- Cc gautam.2011@… added
- Keywords has-patch tested added; needs-patch removed
- Milestone changed from 1.1 to 1.0.3
- Severity changed from normal to major
Attached the patch. It uses typecasting (as suggested here - http://php.net/manual/en/function.array-merge.php).
#3
@
15 years ago
- Owner set to chrishajer
Where would I see this warning? I'd like to see it before I patch and see that it's resolved. Thanks
#4
@
15 years ago
- Keywords xmlrpc removed
- Summary changed from xmlrpc array_merge warning to XML-RPC array_merge warning
Steps to reproduce:
1) Go to Settings -> Discussion and ensure that "Enable Pingbacks" is checked.
2) Go to Settings -> Writing and ensure that "XML-RPC" option is unchecked.
3) Go to yourforum.com/xmlrpc.php, and you should see an error like this:
Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in <b>/home/.../yourforum.com/xmlrpc.php</b> on line <b>164</b><br />
If you dont see the error (should not be the case, but still), then uncheck both the options and then check the "Enable Pingbacks" option.
#5
@
15 years ago
OK, testing: enable pingbacks == true, XML-RPC == false. I do get this exact error. Will apply patch now and test again.
Use typecasting to prevent error