This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
If you have error_handling=“inline” on and a file fieldtype on a channel form then you get the bellow error. It happens if you submit, receive a standard form error (like “The ‘field name’ is required.”), then go to the the same URL as the error page. The error is due to having for form info/meta still in the url (i.e. ?RET=...)
A PHP Error was encountered
Severity: Notice
Message: Undefined index: CONTENT_LENGTH
Filename: libraries/Filemanager.php
Line Number: 1949
This is the function in question:
public function validate_post_data()
{
ee()->load->helper('number_helper');
$post_limit = get_bytes(ini_get('post_max_size'));
return $_SERVER['CONTENT_LENGTH'] <= $post_limit;
}
If you change line 302 of libraries/File_field.php like bellow, it should do the trick (worked for me) but I don’t know if the validate_post_data() function is called anywhere else.
if ( ! ee()->filemanager->validate_post_data())
to:
if ( isset($_SERVER['CONTENT_LENGTH']) && ! ee()->filemanager->validate_post_data())
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```