HasOptions 函数问题
kbdxbt opened this issue · 4 comments
soar-php/src/Concerns/HasOptions.php
Line 1556 in 6c4564b
这段代码有个问题,就是因为的 database 参数是 test,然后laravel助手函数中又包含 test 函数,这样导致执行出现了异常。
这里是否考虑加上 is_object 去判断是否是匿名函数
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@kbdxbt Sorry, I just saw it. It should be enough to exclude functions from the callback types. I'll change it when I have time.
@kbdxbt不好意思我刚看到。从回调类型中排除是函数应该就可以了。我有时间改一下。
好的,我也是偶然发现这个问题,我本地使用了“test“名称的数据库,刚好pest里面也有这个助手函数,就触发了这个问题。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@kbdxbtSorry I just saw it. Excluding functions from callback types should do the trick. I'll change it when I have time.
Okay, I discovered this problem accidentally. I used a database with the name "test" locally, and there happened to be this helper function in pest, which triggered this problem.