01-03-2017, 01:59 PM,
|
|
PakRicard
Senior Member
|
Posts: 252
Threads: 81
Joined: Jan 2012
|
|
Warnings shown in GLCashFlowsIndirect.php
Hi all:
Just merged webERP commit 7715 and found that GLCashFlowsIndirect.php is showing the following warnings:
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 79
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 80
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 100
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 109
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 468
Strict Standards: Only variables should be passed by reference in /home/mydomain.com/GLCashFlowsIndirect.php on line 485
It is the first time I used this script, so not sure since which commit it shows the warnings.
Regards,
Pak Ricard
|
|
01-05-2017, 10:13 AM,
|
|
PakRicard
Senior Member
|
Posts: 252
Threads: 81
Joined: Jan 2012
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
Thanks Tim. Fixed and commited.
Regards,
Pak Ricard
|
|
01-06-2017, 03:54 PM,
|
|
PakRicard
Senior Member
|
Posts: 252
Threads: 81
Joined: Jan 2012
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
Also thanks to Rafael, who commited the bit I forgot :-)
Regards,
Pak Ricard
|
|
01-07-2017, 01:19 AM,
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
Hi,
You are welcome Pak Ricard. For future reference: Commit [r7717]: For strict Standards, removes the "&" before the variable in DB_fetch_row() and in DB_fetch_array() in ConnectDB_XXX.inc. Thanks Tim. ( https://sourceforge.net/p/web-erp/code/7717/).
Should we remove the rest of "&" before the variable in ConnectDB_XXX.inc?
Best regards, Rafael.
Rafael E. Chacón
Verdorama
http://www.verdorama.com
|
|
01-09-2017, 06:20 PM,
|
|
PakRicard
Senior Member
|
Posts: 252
Threads: 81
Joined: Jan 2012
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
Hi Rafael:
I just realized that your commit 7719 rollback the changes commited in 7716 about the warnings I found in this script. Did you find some side effect and decided to rollback?
Thanks.
Regards,
Pak Ricard
|
|
01-13-2017, 10:06 AM,
|
|
PakRicard
Senior Member
|
Posts: 252
Threads: 81
Joined: Jan 2012
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
(01-12-2017, 08:07 PM)falkoner Wrote: Hi Ricard, I am not sure whether Rafael intended to rollback those changes however making the changes in the ConnectDB_XXXX.inc files means that the changes in the script are not strictly necessary. However personally I prefer the statements to be split on separate lines as is usual in webERP, but thats just a personal preference.
Tim
Thanks Tim. I misunderstood the issue, then.
Regards,
Pak Ricard
|
|
01-14-2017, 03:15 AM,
|
|
RE: Warnings shown in GLCashFlowsIndirect.php
Hi Ricard,
The problem was caused by the operator "&" before the variable in DB_fetch_row() and in DB_fetch_array() in ConnectDB_XXX.inc. Using multiples lines (multiples variables) solves the way the last variable is seen by PHP (in strict mode) but not solves the problem itself.
When we remove the "&" before the variable in DB_fetch_row() and in DB_fetch_array() in ConnectDB_XXX.inc (commit r7717), we solved the problem here and in other scripts.
I restored the "compact" code because I prefer to simplify the code to easy understand (less lines, less variables, less steps) and to have a"very little" less use of resources.
Best regards, Rafael.
Rafael E. Chacón
Verdorama
http://www.verdorama.com
|
|
|