Problem is in this: echo $village_id. "-" .$wg_village;
It returns:
Catchable fatal error: Object of class stdClass could not be converted to string in /files/function_20.php on line 70
And on line 70 I posted the code that is there, function works perfectly, just returns blank page with an error.
What's wrong with that line? And how can I correct that?
EDIT: A var_dump $village_id and $wg_village:
string(5) "80784"
object(stdClass)#25 (35) {
  ["id"]=> string(5) "80784"
  ["name"]=> string(7) "NewName"
  ["x"]=> string(3) "-99"
  ["y"]=> string(3) "-14"
  ["kind_id"]=> string(1) "5"
  ["user_id"]=> string(1) "1"
  ["rs1"]=> int(36000) ["rs2"]=> int(36000)
  ["rs3"]=> int(36000) ["rs4"]=> int(36000)
  ["workers"]=> string(2) "51"
  ["troop_keep"]=> string(1) "0"
  ["time_update_rs1"]=> string(19) "2014-05-09 01:45:30"
  ["time_update_rs2"]=> string(19) "2014-05-09 01:45:30"
  ["time_update_rs3"]=> string(19) "2014-05-09 01:45:30"
  ["time_update_rs4"]=> string(19) "2014-05-09 01:45:30"
  ["nation_id"]=> string(1) "2" ["merchant_underaway"]=> string(1) "0"
  ["child_id"]=> string(0) "" ["cp"]=> string(3) "104"
  ["cpupdate_time"]=> string(19) "2014-05-08 21:49:55"
  ["krs1"]=> string(1) "1"
  ["krs2"]=> string(1) "1"
  ["krs3"]=> string(1) "1"
  ["krs4"]=> string(1) "1"
  ["faith"]=> string(1) "3"
  ["faith_time"]=> string(19) "2014-05-07 22:05:44"
  ["dateCreate_vila"]=> string(19) "2014-05-05 20:38:26"
  ["capa123"]=> int(36000)
  ["capa4"]=> int(36000)
  ["speedIncreaseRS1"]=> float(1000)
  ["speedIncreaseRS2"]=> float(600)
  ["speedIncreaseRS3"]=> float(800)
  ["speedIncreaseRS4"]=> float(1200)
  ["speedIncreaseRS4Real"]=> float(1149)
}
 
     
     
    