Virgül eklersem çok daha fazla log'da hata veriyor.

[29-Nov-2022 19:23:33 UTC] PHP Warning:  PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'json_table where ID = 403425' at line 1 in /home/siteadi/public_html/v2/orm/idiorm.php on line 505
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant exportMeta - assumed 'exportMeta' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 25
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant exportTerms - assumed 'exportTerms' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 26
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant exportMedia - assumed 'exportMedia' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 27
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant exportMeta - assumed 'exportMeta' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 29
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:33 UTC] PHP Warning:  PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set primary_image = concat('/wp-content/uploads/', primary_image) where (primary' at line 1 in /home/siteadi/public_html/v2/orm/idiorm.php on line 505
[29-Nov-2022 19:23:36 UTC] PHP Warning:  PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'json_table where ID = 403425' at line 1 in /home/siteadi/public_html/v2/orm/idiorm.php on line 505
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant exportMeta - assumed 'exportMeta' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 25
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant exportTerms - assumed 'exportTerms' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 26
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant exportMedia - assumed 'exportMedia' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 27
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant exportMeta - assumed 'exportMeta' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/addJsonTable.php on line 29
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  Use of undefined constant unserializeFunc - assumed 'unserializeFunc' (this will throw an Error in a future version of PHP) in /home/siteadi/public_html/v2/orm/methods.php on line 57
[29-Nov-2022 19:23:36 UTC] PHP Warning:  PDOStatement::execute(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set primary_image = concat('/wp-content/uploads/', primary_image) where (primary' at line 1 in /home/siteadi/public_html/v2/orm/idiorm.php on line 505
methods.php on line 57 ise burası. ($item['meta'] = array_map(unserializeFunc, $item['meta'])

function exportMeta($item)
{
    $item['meta'] = ORM::for_table('wp_postmeta')->where('post_id', $item['ID'])->where_not_like('meta_value', 'field_%')->find_array();
    $item['meta'] = array_map(unserializeFunc, $item['meta']);
    $item['meta'] = array_combine(array_column($item['meta'], 'meta_key'), array_column($item['meta'], 'meta_value'));
    $item['meta'] = array_filter($item['meta']);
    if ($item['post_type'] == 'attachment' && isset($item['meta']) && $item['meta']['_wp_attached_file']) {
        $item['guid'] = $item['meta']['_wp_attached_file'];
    }

    return $item;
}