-1

i have an error: Trying to access array offset on value of type bool

error happens with : $product->codigo:

<img src="data:image/png;base64,{{DNS1D::getBarcodePNG('$product->codigo', 'C39')}}" alt="barcode" /><br><br>

but if I use only $product it doesn't give me an error

<img src="data:image/png;base64,{{DNS1D::getBarcodePNG('$product', 'C39')}}" alt="barcode" /><br><br>

the error happens when I try to enter the attribute ->codigo

how can I solve that?

jerex
  • 25
  • 4
  • Print your product object, check what is the value of key "codigo". – Ali Raza Aug 16 '23 at 13:32
  • @AliRaza {{$product->codigo}} it prints correctly in blade – jerex Aug 16 '23 at 13:45
  • Does this answer your question? [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – miken32 Aug 16 '23 at 22:55

0 Answers0