Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
Bug: JFU 3.2.5 error in tfu_helper.php https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=5958 |
Page 1 of 1 |
Author: | peterb [ 23. Mar 2019, 23:16 ] |
Post subject: | Bug: JFU 3.2.5 error in tfu_helper.php |
I get the following error in the log file: ERROR 8 in onents/com_jfuploader/tfu/tfu_helper.php, line 462: A non well formed numeric value encountered. The line in question is 462 if ($memory > return_kbytes(ini_get('memory_limit')*1024) - $InUse) I think the problem is, that 'memory_limit' is not an integer and not for sure in kB, when multiplying it by 1024 I changed it to the following and that got rid of the error. if ($memory > return_kbytes(ini_get('memory_limit'))*1024 - $InUse) Question: In the same file in function return_kbytes($val) on line 513, shouldn't the value for GB be 1048576 ? Peter |
Author: | TinyWebGallery [ 29. Mar 2019, 22:35 ] |
Post subject: | Re: Bug: JFU 3.2.5 error in tfu_helper.php |
How is the setting of memory_limit of your server? Normally MB GB are supported. Maybe you have a char in there which is not valid. Best, Michael |
Author: | peterb [ 30. Mar 2019, 02:06 ] |
Post subject: | Re: Bug: JFU 3.2.5 error in tfu_helper.php |
Hi Michael, As I indicated, I think it is a bracket issue in the statement. If 'memory_limit' = '8M', then ini_get('memory_limit')*1024 will produce an error. In php only the + operator will transform the string to an integer. By first doing return_kbytes(ini_get('memory_limit')) then you will multiply an integer with 1024. Curiously enough line 467 in the same file tfu_helper.php has the statement in the form I proposed. Reguarding my last question, GB * 1024 * 1024 gives you the value in kB Thanks, Peter |
Author: | TinyWebGallery [ 31. Mar 2019, 19:15 ] |
Post subject: | Re: Bug: JFU 3.2.5 error in tfu_helper.php |
You are right. The bracket are wrong. Strange that this no one has found before. i'll check and provide an update. Best, Michael |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |