I have some script that worked before, and now I'm getting some errors. Somebody can help me find the mistake?
while ($value = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
$m = $value['d'];
$o = new ReflectionObject($m);
$p = $o->getProperty('date');
echo "<tr>";
echo "<td>";
if ($value['BsDocEntry']) {
$id = $value['BsDocEntry'];
if (strtotime($value['d']->date) > strtotime('01.01.2016')) {
$id += 383;
}
} else {
$id = $value['BaseEntry'];
if (strtotime($value['d']->date) > strtotime('01.01.2016')) {
$id += 138;
}
}
echo $id;
and the error is:
PHP Fatal error: Uncaught ReflectionException: Property date does not exist in C:\inetpub\wwwroot\serialtest.php:164
Stack trace:
#0 C:\inetpub\wwwroot\serialtest.php(164): ReflectionClass->getProperty('date')
#1 {main}
thrown in C:\inetpub\wwwroot\serialtest.php on line 164