]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Properly handle feed item creation date with surrounding whitespace
[friendica.git] / src / Core / System.php
index 65dce1bc0e51f75e8f2bd6d5416c7dded18e3d61..42f5ab36aef2c85e001dfe60ddbf337405648d9a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -253,12 +253,12 @@ class System
                                $func['database'] = in_array($func['class'], ['Friendica\Database\DBA', 'Friendica\Database\Database']);
                                if (!$previous['database'] || !$func['database']) {
                                        $classparts = explode("\\", $func['class']);
-                                       $callstack[] = array_pop($classparts).'::'.$func['function'];
+                                       $callstack[] = array_pop($classparts).'::'.$func['function'] . (isset($func['line']) ? ' (' . $func['line'] . ')' : '');
                                        $previous = $func;
                                }
                        } elseif (!in_array($func['function'], $ignore)) {
                                $func['database'] = ($func['function'] == 'q');
-                               $callstack[] = $func['function'];
+                               $callstack[] = $func['function'] . (isset($func['line']) ? ' (' . $func['line'] . ')' : '');
                                $func['class'] = '';
                                $previous = $func;
                        }
@@ -294,7 +294,7 @@ class System
                }
 
                DI::apiResponse()->setType(Response::TYPE_XML);
-               DI::apiResponse()->addContent(XML::fromArray(["result" => $result], $xml));
+               DI::apiResponse()->addContent(XML::fromArray(['result' => $result]));
                DI::page()->exit(DI::apiResponse()->generate());
 
                self::exit();