small fixes for error reporting
This commit is contained in:
@@ -352,7 +352,7 @@ class Core
|
|||||||
|
|
||||||
$pdo->query($froxlorSQL);
|
$pdo->query($froxlorSQL);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
throw new Exception('failed to import data!', 0, $e);
|
throw new Exception('failed to import data!' . $e->getMessage(), 0, $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ class PhpHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function sortListByGivenKey($a, $b)
|
private static function sortListByGivenKey($a, $b): int
|
||||||
{
|
{
|
||||||
if (self::$sort_type == SORT_NATURAL) {
|
if (self::$sort_type == SORT_NATURAL) {
|
||||||
return strnatcasecmp($a[self::$sort_key], $b[self::$sort_key]);
|
return strnatcasecmp($a[self::$sort_key], $b[self::$sort_key]);
|
||||||
@@ -480,10 +480,11 @@ class PhpHelper
|
|||||||
* Generate php file from array.
|
* Generate php file from array.
|
||||||
*
|
*
|
||||||
* @param array $array
|
* @param array $array
|
||||||
|
* @param string|null $comment
|
||||||
* @param bool $asReturn
|
* @param bool $asReturn
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function parseArrayToPhpFile(array $array, string $comment = null, $asReturn = false): string
|
public static function parseArrayToPhpFile(array $array, string $comment = null, bool $asReturn = false): string
|
||||||
{
|
{
|
||||||
$str = sprintf("<?php\n// %s\n\n", $comment ?? 'autogenerated froxlor file');
|
$str = sprintf("<?php\n// %s\n\n", $comment ?? 'autogenerated froxlor file');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user