Laravel-ide-helper: Exception: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Created on 27 Feb 2019  路  5Comments  路  Source: barryvdh/laravel-ide-helper

I'm getting this error with ide-helper v2.6.0 and v.2.5,. It was working some hours ago.
imagen

Most helpful comment

This exception is given when using PHP 7.3. I use Homestead and solved it by executing
php7.2 artisan ide-helper:models

I don't know what your situation is, but either wait for a bugfix or use PHP 7.2.

All 5 comments

This exception is given when using PHP 7.3. I use Homestead and solved it by executing
php7.2 artisan ide-helper:models

I don't know what your situation is, but either wait for a bugfix or use PHP 7.2.

@juliuscaesarnl yes, that was the problem. I downgraded to PHP 7.2. Thank you!

@andreshg112 You're welcome! I suggest waiting with 7.3 since there are still a bunch of issues when using it with Xdebug, for example.

For me its working PHP 7.3.2 with Xdebug v2.7.0rc1 on Laravel 5.7

But same setup on Laravel 5.8 it's not working. Is there an issue with Laravel 5.8??

I got it fixed, by editing: Barryvdh\LaravelIdeHelper\Console\ModelsCommand , line 483

Before:

if (stripos($impl, $type) || stripos($impl, $type) !== false) {

After:

if ($type && (stripos($impl, (string)$type) || stripos($impl, $type) !== false)) {

Credit:
https://github.com/raknjak/CIMembership/commit/e866ee3dcc8095cb3c43f9fbe6da3c64cc0fdd4b (application/vendor/MX/Router.php changes)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quantumwebco picture quantumwebco  路  4Comments

kickthemooon picture kickthemooon  路  3Comments

Alymosul picture Alymosul  路  4Comments

4n70w4 picture 4n70w4  路  3Comments

Newbie012 picture Newbie012  路  4Comments