2013/5/16 adam <adamgsoc2013(a)gmail.com>om>:
Hi,
Although I changed the "require" to "require _once" on
libraries/common.inc.php
other redefine error still existed:
https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/7223416
so I think to test the files which requires "libraries/common.inc.php", the
problem will exist.
Any advice? thanks
Using require_once, will only include the file if it wasn't included
before, see [0].
If you use require, it will include the file, regardless if it was
included at another place or in another included file. If a function
or class is defined in a file that was included before, you get the
error that you mention.
Because keeping track of where which files were included, is too
complicated, using require_once is the best option.
I agree with you about that. But I don't know why the file libraries/common.inc.php
use "require" but not "require _once". this file will be used
frequently, so use "require _once" is better.
I was thinking that there must be some special reason.
thanks for your information.
Adam