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?