Questions tagged [fatal-error]
An error that causes a program to abort, regardless of the programming language.
fatal-error
2,099
questions
603
votes
18
answers
430k
views
How do I catch a PHP fatal (`E_ERROR`) error?
I can use set_error_handler() to catch most PHP errors, but it doesn't work for fatal (E_ERROR) errors, such as calling a function that doesn't exist. Is there another way to catch these errors?
I am ...
252
votes
16
answers
493k
views
Fatal error: Class 'SoapClient' not found
I'm trying a simple web service example and I get this error even though I uncommented extension=php_soap.dll in the php.ini file:
Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)...
182
votes
12
answers
215k
views
Weird PHP error: 'Can't use function return value in write context'
I'm getting this error and I can't make head or tail of it.
The exact error message is:
Fatal error: Can't use function return
value in write context in
/home/curricle/public_html/descarga/...
179
votes
9
answers
680k
views
PHP Fatal error: Using $this when not in object context
I've got a problem:
I'm writing a new WebApp without a Framework.
In my index.php I'm using: require_once('load.php');
And in load.php I'm using require_once('class.php'); to load my class.php.
In ...
174
votes
19
answers
447k
views
PHP Fatal error: Cannot redeclare class
Does anyone know what can cause this problem?
PHP Fatal error: Cannot redeclare class
163
votes
13
answers
142k
views
How to correct `git` reporting `detected dubious ownership in repository` without adding `safe.directory` when using WSL?
I used git for the last few years in this context:
Host = my laptop, windows.
WSL enabled
Repos live in the Linux side.
I access them both from the Linux and the Windows side.
I can access the files ...
144
votes
15
answers
162k
views
Why, Fatal error: Class 'PHPUnit_Framework_TestCase' not found in ...?
Why I'm getting this PHP error?
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in ...
122
votes
4
answers
123k
views
relative path in require_once doesn't work
I have the following structure
otsg
> class
> authentication.php
> database.php
> user.php
> include
> config.inc.php
> encryption.php
> include.php
> ...
101
votes
1
answer
61k
views
How can I catch a "catchable fatal error" on PHP type hinting?
I am trying to implement Type Hinting of PHP5 on one of my class,
class ClassA {
public function method_a (ClassB $b)
{}
}
class ClassB {}
class ClassWrong{}
Correct usage:
$a = new ClassA;...
85
votes
9
answers
441k
views
PHP Notice: Undefined offset: 1 with array when reading data
I am getting this PHP error:
PHP Notice: Undefined offset: 1
Here is the PHP code that throws it:
$file_handle = fopen($path."/Summary/data.txt","r"); //open text file
$data = array(); // create ...
84
votes
8
answers
93k
views
How to catch the fatal error: Maximum execution time of 30 seconds exceeded in PHP
I've been playing around with a system I'm developing and managed to get it to cause this:
Fatal error: Maximum execution time of 30 seconds exceeded
It happened when I was doing something ...
76
votes
13
answers
28k
views
Broken branch in git, fatal: your current branch appears to be broken
Here is my case:
I was working on one branch.
Pushed new commits to the remote.
Switched back to the master branch.
But suddenly after typing git checkout master command my computer encountered ...
66
votes
7
answers
131k
views
PHP Fatal error: Cannot access empty property
I'm new to php and I have executed below code.
<?php
class my_class{
var $my_value = array();
function my_class ($value){
$this->my_value[] = $value;
}
function ...
66
votes
6
answers
58k
views
PHP : Custom error handler - handling parse & fatal errors
How can i handle parse & fatal errors using a custom error handler?
66
votes
2
answers
34k
views
SwiftUI -> Thread 1: Fatal error: No observable object of type MyObject.Type found (EnvironmentObject in sheet)
I'm building an app with SwiftUI. When I was trying to display a sheet (previously Modal), this error message appears:
Thread 1: Fatal error: No observable object of type ...