Asked  8 Months ago    Answers:  5   Viewed   19 times

Does anyone know why my require_once () or die(); is not working. It's always shown the Fatal error instead of the error message that I key in into the die(). See below for my code:

require_once ('abc.php') or die("oops");

Error message display as below

"Fatal error: controller::require_once() [function.require]: Failed opening required '1' (include_path='....."

instead of the message ("oops") I key in.



or has a higher precedence than require/require_once. Therefore php evaluates

('abc.php') or die("oops")

before passing the result to require_once. Or takes two boolean operands. ('abc.php') evaluates to true therefore the whole expression is true and

require_once true;

is invoked. require_once takes a string, bool(true)->string => 1 =>

Failed opening required '1'
You don't need the or die(...) there. If the file can't be read require_once will stop the php instance anyway.
Wednesday, March 31, 2021
answered 8 Months ago

You should point to your vendor/autoload.php at Settings | PHP | PHPUnit when using PHPUnit via Composer.

This blog post has all the details (with pictures) to successfully configure IDE for such scenario:

Related usability ticket:

P.S. The WI-18388 ticket is already fixed in v8.0

Wednesday, March 31, 2021
answered 8 Months ago

On Mac OS X environment variables available in Terminal and for the normal applications can be different, check the related question for the solution how to make them similar.

Note that this solution will not work on Mountain Lion (10.8).

Saturday, May 29, 2021
answered 5 Months ago

Change your method from

public void updateReceiptsList(List<Receipt> newlist) {
    receiptlist = newlist;


public void updateReceiptsList(List<Receipt> newlist) {

So you keep the same object as your DataSet in your Adapter.

Wednesday, June 9, 2021
answered 5 Months ago

It does seem to be a bit flakey, but this is the actual fix in this case:

public IBinder onBind(Intent intent) {
    return super.onBind(intent);
Monday, August 23, 2021
answered 2 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :