Troubleshooting
Receive an Error Type E_ERROR eval()’d code causes error: Uncaught TypeError
If you receive an error "Type E_ERROR in line ... of the file ... eval()’d code causes error: Uncaught TypeError...", that means that the error received from your block code.
If you use the block PHP render string, your code is executed using eval()
function, and the error comes from your custom block code. Since it is rendered using eval it is hard to debug what exactly is failed.
Try to change your block code to the functional callback or template render to better understand what happens.