View Single Post
  #2  
Old 05-17-2017, 07:23 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 95,754
Dinocanid is on a distinguished road
Default

Since I got error messages back, I was able to find this as the error:
Quote:
Catchable fatal error: Method StockItem::__toString() must return a string value in /home/adopttes/public_html/view/treasureview.php on line 103
I tried using this like strval and (string) but that didn't work.

EDIT: I was able to fix it! I had to use this to get the name of the item:
Quote:
$ni1_name = $newitem1->itemname;
$document->add(new Comment("Congratulations! You earned a {$ni1_name} !"));
__________________

Last edited by Dinocanid; 05-17-2017 at 08:06 PM.
Reply With Quote