Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented May 7, 2019

a shot in the dark to fix:

Error: Class name must be a valid object or a string

#224 (comment)

if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) {
--$list->idx;
if ($class !== null) {
if ((new $class()) instanceof FunctionCall) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be simplified using is_a() so we would not need to create a object just to check for its class

https://php.net/is_a

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@staabm I think I'll merge this now to fix the current errors, and if you have time and a desire to modify the code to use is_a() instead, that would be a big benefit. Since we can implement the is_a() method in more places than just this one, I think it makes more sense to merge this and then make modifications. Sound good?

Copy link
Contributor Author

@staabm staabm May 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, Please go ahead

@staabm
Copy link
Contributor Author

staabm commented May 7, 2019

//cc @ibennetch

@ibennetch
Copy link
Member

That sure looks like it fixes it! I'll let the whole Travis suite finish running first, but this works correctly on my local system. Nice work.

@codecov
Copy link

codecov bot commented May 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@59af899). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master     #245   +/-   ##
=========================================
  Coverage          ?   99.58%           
  Complexity        ?     1854           
=========================================
  Files             ?       62           
  Lines             ?     4127           
  Branches          ?        0           
=========================================
  Hits              ?     4110           
  Misses            ?       17           
  Partials          ?        0

Copy link
Member

@devenbansod devenbansod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ibennetch ibennetch merged commit b032d82 into phpmyadmin:master May 9, 2019
@staabm staabm deleted the patch-1 branch May 9, 2019 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants