欢迎各位兄弟 发布技术文章
这里的技术是共享的
应该是 laravel 版本 太低, php 版本太高
我的 laravel 是 5.2,我的 php 是7.3
@JacobBennett Hey Jacob. We don't support 5.4 anymore. Does this also happen for you on 5.5 or 5.7? |
Gotcha, its just an old install, I'm sure if this is on 5.5 then it will break as well, let me check. |
Nope, looks like it was fixed in 5.5. Thanks! |
Okay no problem! |
Hi I am getting the exact same issue on Laravel 5.6.33 and PHP 7.3.1 As @JacobBennett described the steps to reproduce are chaining a
|
Likely this is fixed in 5.5(since it is an LTS version) and the current version, 5.7. 5.6 is no longer supported. |
hmmm,thats good. by the way how to update laravel version? |
Hey guys, I'm having the same issue with Laravel 5.5.40 and PHP 7.3.5 Do you know why could that be? Thank you |
@landadelcarmen |
Hey guys. Getting the same issue with 5.8.24 and PHP 7.3.4. Isn't the fix on 5.8 as well? |
Share your code @matt-daneshvar and the exception. |
@mattwithoos I'm on PHP 7.3.7, Laravel Framework 5.8.29, I think I have the same issue. Here is the code:
The error is:
|
I am getting same error with:
|
@josecelano Same errors here |
I had same issue with |
I have the same issue. I have https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Query/Builder.php#L1229 But I can't find a way to "update" to this one. Regards! EDIT: Nvm, I fixed it with this: |
来自 https://github.com/laravel/framework/issues/26936
的MySQL 描述:当尝试不退出 ErrorException
compact():未定义变量:运算符 重现步骤:将 类似于#25193 |
@JacobBennett嘿,雅各布。我们不再支持5.4。在5.5或5.7上是否也会发生这种情况? |
Gotcha,它只是一个旧的安装程序,我确定它是否在5.5上也会损坏,让我检查一下。 |
不,看起来好像是在5.5中修复的。谢谢! |
好的没问题! |
嗨,我在Laravel 5.6.33和PHP 7.3.1上遇到了完全相同的问题 正如@JacobBennett所述,重现步骤是将
|
可能在5.5(因为它是LTS版本)和当前版本5.7中已修复。不再支持5.6。 |
嗯,那很好。顺便问一下如何更新laravel版本? |
大家好,我在Laravel 5.5.40和PHP 7.3.5中遇到了同样的问题 你知道为什么会这样吗? 谢谢 |
@landadelcarmen |
大家好。5.8.24和PHP 7.3.4遇到相同的问题。5.8的修复程序不是吗? |
分享您的代码@ matt-daneshvar和异常。 |
@mattwithoos我使用的是PHP 7.3.7,Laravel Framework 5.8.29,我认为我有同样的问题。 这是代码:
错误是:
|
我收到以下相同错误:
|
@josecelano这里同样的错误 |
我有同样的问题 |
我有同样的问题。我 https://github.com/laravel/framework/blob/5.4/src/Illuminate/Database/Query/Builder.php#L1229 但是我找不到一种“更新”到这一方法。 问候! 编辑:Nvm,我用此修复它: |
JacobBennett commentedon 22 Dec 2018 • edited
Laravel Version: 5.4
PHP Version: 7.3
Database Driver & Version:
MySQL
Description:
when trying to
compact
theoperator
variable which does not exits, php 7.3 will throw anErrorException
.ErrorException compact(): Undefined variable: operator
framework/src/Illuminate/Database/Query/Builder.php
Line 1229 in 8a74cf9
Steps To Reproduce:
Chain a
has
method onto theQuery/Builder
in php 7.3.Similar to #25193