-
Notifications
You must be signed in to change notification settings - Fork 12
Wrong type argument: stringp, nil
while in class method
#28
Comments
Are you calling |
This is the example that I tested. ( <?php
class MyClass
{
public function __construct()
{
array_chunk|
}
} |
That is one-hundred percent a bug due on the part of this package then. |
I don't quite understand how though.
<?php
class MyClass
{
/**
* @comment array_chunk[4]
*/
public function hello() // array_chunk[5]
{
array_chunk[1]
}
array_chunk[2]
}
array_chunk[3] |
I half-wonder if the problems of instances 1 and 2 are not caused by bugs of my own in PHP Mode. Regardless, php-auto-yasnippets should be smarter about looking (backwards) at the current thing at point to see if whether or not it matches a known function or method it can expand. |
I get this same issue in a constructor of a object. So just |
@chrissound Thank you for the additional info. I have to apologize because I am busy over this weekend and next week, so I won't be able to look into this again soon. But I will try to fix it when my personal life schedule allows me a big chunk of free time. Sorry again for the delay. |
@ejmr No need to apologize! Thank you for your effort and this plugin! |
It looks like somehow,
(thing-at-point 'sexp)
is returningnil
when I call(yas/create-php-snippet)
inside a class method. If I bring the cursor out of the method, then the function works correctly.Is this a problem with
thing-at-point
orphp-auto-yasnippets
? (Calling(thing-at-point 'string)
is also returningnil
).I'm not sure.
Click for error.
The text was updated successfully, but these errors were encountered: