projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security update for Core, with self-updated composer
[yaffs-website]
/
vendor
/
psy
/
psysh
/
src
/
Psy
/
TabCompletion
/
Matcher
/
ObjectMethodsMatcher.php
diff --git
a/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php
b/vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php
index 5983aad91cd83451bacde2fff81d3f2a57ee6857..dfb1d305f4b566757f47008c09c451a4a0eb1676 100644
(file)
--- a/
vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php
+++ b/
vendor/psy/psysh/src/Psy/TabCompletion/Matcher/ObjectMethodsMatcher.php
@@
-47,10
+47,16
@@
class ObjectMethodsMatcher extends AbstractContextAwareMatcher
return array();
}
return array();
}
+ if (!is_object($object)) {
+ return array();
+ }
+
return array_filter(
get_class_methods($object),
function ($var) use ($input) {
return array_filter(
get_class_methods($object),
function ($var) use ($input) {
- return AbstractMatcher::startsWith($input, $var);
+ return AbstractMatcher::startsWith($input, $var) &&
+ // also check that we do not suggest invoking a super method(__construct, __wakeup, …)
+ !AbstractMatcher::startsWith('__', $var);
}
);
}
}
);
}
@@
-60,7
+66,7
@@
class ObjectMethodsMatcher extends AbstractContextAwareMatcher
*/
public function hasMatched(array $tokens)
{
*/
public function hasMatched(array $tokens)
{
- $token = array_pop($tokens);
+ $token
= array_pop($tokens);
$prevToken = array_pop($tokens);
switch (true) {
$prevToken = array_pop($tokens);
switch (true) {