Support the ongoing development of Laravel.io →
posted 10 years ago
Blade

We have updated today from 4.1 to 4.2. But now the following code doesn't give the same result.

{{ $testdata->texts['opgave'] or '' }}

In 4.1, the text in $testdata->texts['opgave'] was printed succesfully.

In 4.2, it just prints 1.

Any ideas?

Thanks.

Last updated 3 years ago.
0

Seems that using " instead of ' for the array does fix the problem.

{{ $testdata->texts["opgave"] or '' }}

Seems this was needed to fix another problem: https://github.com/laravel/framework/pull/5224

Last updated 10 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

KevinM86 kevinm86 Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.