git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3cb8e96
)
Fix: better generation of method signatures in wrap_php_ calls
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 30 May 2015 09:47:07 +0000
(11:47 +0200)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 30 May 2015 09:47:07 +0000
(11:47 +0200)
NEWS
patch
|
blob
|
history
src/Wrapper.php
patch
|
blob
|
history
diff --git
a/NEWS
b/NEWS
index
d941bcf
..
8d8c130
100644
(file)
--- a/
NEWS
+++ b/
NEWS
@@
-60,7
+60,8
@@
PLEASE READ CAREFULLY THE NOTES BELOW to insure a smooth upgrade.
* fixed: the debugger would fail sending a request with ISO-8859-1 payload (it missed the character set declaration).
It would have a hard time coping with ISO-8859-1 in other fields, such as e.g. the remote method name
* fixed: the debugger would fail sending a request with ISO-8859-1 payload (it missed the character set declaration).
It would have a hard time coping with ISO-8859-1 in other fields, such as e.g. the remote method name
-* fixed: the debugger would generate a bad payload via the 'load method synopsis' button for signatures containing NULLs
+* fixed: the debugger would generate a bad payload via the 'load method synopsis' button for signatures containing NULL
+ or undefined parameters
* fixed: the debugger would generate a bad payload via the 'load method synopsis' button for methods with multiple
signatures
* fixed: the debugger would generate a bad payload via the 'load method synopsis' button for methods with multiple
signatures
diff --git
a/src/Wrapper.php
b/src/Wrapper.php
index
21321a6
..
f7f2072
100644
(file)
--- a/
src/Wrapper.php
+++ b/
src/Wrapper.php
@@
-280,10
+280,10
@@
class Wrapper
$desc .= $doc;
} elseif (strpos($doc, '@param') === 0) {
// syntax: @param type $name [desc]
$desc .= $doc;
} elseif (strpos($doc, '@param') === 0) {
// syntax: @param type $name [desc]
- if (preg_match('/@param\s+(\S+)\s+(\$\S+)\s
+
(.+)?/', $doc, $matches)) {
+ if (preg_match('/@param\s+(\S+)\s+(\$\S+)\s
*
(.+)?/', $doc, $matches)) {
$name = strtolower(trim($matches[2]));
//$paramDocs[$name]['name'] = trim($matches[2]);
$name = strtolower(trim($matches[2]));
//$paramDocs[$name]['name'] = trim($matches[2]);
- $paramDocs[$name]['doc'] =
$matches[3]
;
+ $paramDocs[$name]['doc'] =
isset($matches[3]) ? $matches[3] : ''
;
$paramDocs[$name]['type'] = $matches[1];
}
$i++;
$paramDocs[$name]['type'] = $matches[1];
}
$i++;