]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/View.php
mysql connection via socket if location of mysqld.sock was specified
[friendica.git] / src / Database / View.php
index dd3c3e39fc076b2e081ca8fd3727769d9d6301b9..a31151c2117a3d8d63a848372f2515d3164a4ac2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -102,7 +102,7 @@ class View
        {
                $database = self::definition($basePath, false);
 
-               foreach ($database AS $name => $structure) {
+               foreach ($database as $name => $structure) {
                        echo "--\n";
                        echo "-- VIEW $name\n";
                        echo "--\n";
@@ -117,7 +117,7 @@ class View
                $r = true;
 
                $sql_rows = [];
-               foreach ($structure["fields"] AS $fieldname => $origin) {
+               foreach ($structure["fields"] as $fieldname => $origin) {
                        if (is_string($origin)) {
                                $sql_rows[] = $origin . " AS `" . DBA::escape($fieldname) . "`";
                        } elseif (is_array($origin) && (sizeof($origin) == 2)) {