#27508Get value from cookie
Description
At the moment the only possibilty to get a value from a cookie is this:
lib.files = TEXT
lib.files {
data = global:HTTP_COOKIE_VARS|files
}
where files is the cookie name.
The problem with this? It does NOT work if “register_long_arrays” in php.ini is off and by the way:
*This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.*
from: http://php.net/manual/en/ini.core.php
I would like to create a patch for the core which does the following:
add a new item to “function getData” in class.tslib_content.php for example:
case 'cookie' :
$retVal = $this->getCookie($key);
break;
and then a function which basically does this (of course with more error checking)
function getCookie($key) {
return $_COOKIE[$key];
}
any comments on that or shall i commit to gerrit already?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.