PHP “trigger_error” causing fatal exceptionHow can I prevent SQL injection in PHP?PHP and EnumerationsDeleting an element from an array in PHPConvert HTML + CSS to PDF with PHP?startsWith() and endsWith() functions in PHPHow do I get PHP errors to display?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Designing a prison for a telekinetic race

Default camera device to show screen instead of physical camera

Are there any OR challenges that are similar to kaggle's competitions?

How to think about joining a company whose business I do not understand?

How did Apollo 15's depressurization work?

Levenshtein Neighbours

How can I train a replacement without letting my bosses and the replacement know?

In xXx, is Xander Cage's 10th vehicle a specific reference to another franchise?

How to dismiss intrusive questions from a colleague with whom I don't work?

Using は before 欲しい instead が

Sous vide chicken without an internal temperature of 165

Did the twin engined Lazair ultralight have a throttle for each engine?

Convert HTML color to OLE

Has there ever been a truly bilingual country prior to the contemporary period?

What can I do to keep a threaded bolt from falling out of it’s slot

How do slats reduce stall speed?

Can a Beast Master ranger choose a swarm as an animal companion?

Use of vor in this sentence

Is "stainless" a bulk or a surface property of stainless steel?

Cheap storage lockers in Tromsø, Norway

Moons that can't see each other

How to decide whether an eshop is safe or compromised

Has any ancient or medieval Vedic scholar refuted the guna-based varna theory?

Is there any road between the CA State Route 120 and Sherman Pass Road (Forest Route 22S0) that crosses Yosemite/Serria/Sequoia National Park/Forest?



PHP “trigger_error” causing fatal exception


How can I prevent SQL injection in PHP?PHP and EnumerationsDeleting an element from an array in PHPConvert HTML + CSS to PDF with PHP?startsWith() and endsWith() functions in PHPHow do I get PHP errors to display?How do you parse and process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















In the class DrupalCoreRenderElement this line appears, which handles the case of an invalid key in a render array:



trigger_error((string)(new FormattableMarkup('"@key" is an invalid render array key', ['@key' => $key])), E_USER_ERROR);


On my local dev environment when the condition occurs I get a white screen of death, and a PHP stacktrace in the log. The trigger_error line is the last in the trace. On other servers built by my client's IP guy the error appears in the Drupal watchdog and on the page's messages.



If I temporarily change E_USER_ERROR to E_USER_NOTICE the error is no longer fatal.



So clearly there is some setting somewhere that affects the handling of this error and makes it fatal or not, but I have not been able to find what it is, despite much googling. The Drupal error reporting settings don't affect it.










share|improve this question
























  • php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

    – Romain B.
    Mar 27 at 14:42












  • Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

    – Alfred Armstrong
    Mar 27 at 15:25

















0















In the class DrupalCoreRenderElement this line appears, which handles the case of an invalid key in a render array:



trigger_error((string)(new FormattableMarkup('"@key" is an invalid render array key', ['@key' => $key])), E_USER_ERROR);


On my local dev environment when the condition occurs I get a white screen of death, and a PHP stacktrace in the log. The trigger_error line is the last in the trace. On other servers built by my client's IP guy the error appears in the Drupal watchdog and on the page's messages.



If I temporarily change E_USER_ERROR to E_USER_NOTICE the error is no longer fatal.



So clearly there is some setting somewhere that affects the handling of this error and makes it fatal or not, but I have not been able to find what it is, despite much googling. The Drupal error reporting settings don't affect it.










share|improve this question
























  • php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

    – Romain B.
    Mar 27 at 14:42












  • Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

    – Alfred Armstrong
    Mar 27 at 15:25













0












0








0








In the class DrupalCoreRenderElement this line appears, which handles the case of an invalid key in a render array:



trigger_error((string)(new FormattableMarkup('"@key" is an invalid render array key', ['@key' => $key])), E_USER_ERROR);


On my local dev environment when the condition occurs I get a white screen of death, and a PHP stacktrace in the log. The trigger_error line is the last in the trace. On other servers built by my client's IP guy the error appears in the Drupal watchdog and on the page's messages.



If I temporarily change E_USER_ERROR to E_USER_NOTICE the error is no longer fatal.



So clearly there is some setting somewhere that affects the handling of this error and makes it fatal or not, but I have not been able to find what it is, despite much googling. The Drupal error reporting settings don't affect it.










share|improve this question














In the class DrupalCoreRenderElement this line appears, which handles the case of an invalid key in a render array:



trigger_error((string)(new FormattableMarkup('"@key" is an invalid render array key', ['@key' => $key])), E_USER_ERROR);


On my local dev environment when the condition occurs I get a white screen of death, and a PHP stacktrace in the log. The trigger_error line is the last in the trace. On other servers built by my client's IP guy the error appears in the Drupal watchdog and on the page's messages.



If I temporarily change E_USER_ERROR to E_USER_NOTICE the error is no longer fatal.



So clearly there is some setting somewhere that affects the handling of this error and makes it fatal or not, but I have not been able to find what it is, despite much googling. The Drupal error reporting settings don't affect it.







php drupal-8 php-7.1






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 14:39









Alfred ArmstrongAlfred Armstrong

2083 silver badges8 bronze badges




2083 silver badges8 bronze badges















  • php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

    – Romain B.
    Mar 27 at 14:42












  • Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

    – Alfred Armstrong
    Mar 27 at 15:25

















  • php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

    – Romain B.
    Mar 27 at 14:42












  • Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

    – Alfred Armstrong
    Mar 27 at 15:25
















php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

– Romain B.
Mar 27 at 14:42






php.net/manual/en/errorfunc.constants.php This is like an E_ERROR : Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted

– Romain B.
Mar 27 at 14:42














Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

– Alfred Armstrong
Mar 27 at 15:25





Thanks but that doesn't explain what is happening. In some environments it isn't causing execution to halt.

– Alfred Armstrong
Mar 27 at 15:25












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55379921%2fphp-trigger-error-causing-fatal-exception%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55379921%2fphp-trigger-error-causing-fatal-exception%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript