Add aelxar js method, fixes for core libs, edit base file

aelxar is like aelx but it uses an array and does not use objects
directly

fixed various possible empty array access issues in various core lib &
edit base files
This commit is contained in:
Clemens Schwaighofer
2020-02-27 15:42:32 +09:00
parent 3e29073664
commit a86eaf0f02
9 changed files with 62 additions and 23 deletions

View File

@@ -1808,6 +1808,7 @@ class Basic
*/
public static function stringByteFormat($number, bool $dot_thousand = false)
{
$matches = [];
// detects up to exo bytes
preg_match("/([\d.,]*)\s?(eb|pb|tb|gb|mb|kb|e|p|t|g|m|k|b)$/", strtolower($number), $matches);
if (isset($matches[1]) && isset($matches[2])) {
@@ -2181,6 +2182,8 @@ class Basic
}
// if type is not in the list, but returns as PDF, we need to convert to JPEG before
if (!$type) {
$output = [];
$return = null;
// is this a PDF, if no, return from here with nothing
$convert_prefix = 'png:';
# TEMP convert to PNG, we then override the file name