switched to another hosting and picks up the following error.
Creating Default Object from Empty Value
Here is the code
$ Gallery_Guest = $ this- & gt; pages_model- & gt; getProductgallery_Guest ($ ID);
If (! $ Gallery_Guest) {
$ Gallery_Guest [0] - & gt; img = "/images/no-image.png";
}
Error here on this line.
$ Gallery_Guest [0] - & gt; img = "/images/no-image.png";
What to do?
Answer 1
Correct
if (! $ Gallery_Guest) {
$ Gallery_Guest [0] ["img"] = "/images/no-image.png";
}