Merge branch '3.4' into 4.3
* 3.4: use utf8mb4_bin to align code with documentation [VarDumper] ignore failing __debugInfo()
This commit is contained in:
commit
026d57e196
@ -218,7 +218,7 @@ class PdoSessionHandler extends AbstractSessionHandler
|
|||||||
// - trailing space removal
|
// - trailing space removal
|
||||||
// - case-insensitivity
|
// - case-insensitivity
|
||||||
// - language processing like é == e
|
// - language processing like é == e
|
||||||
$sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8_bin, ENGINE = InnoDB";
|
$sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB";
|
||||||
break;
|
break;
|
||||||
case 'sqlite':
|
case 'sqlite':
|
||||||
$sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)";
|
$sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)";
|
||||||
|
@ -48,6 +48,15 @@ class Caster
|
|||||||
*/
|
*/
|
||||||
public static function castObject($obj, $class, $hasDebugInfo = false)
|
public static function castObject($obj, $class, $hasDebugInfo = false)
|
||||||
{
|
{
|
||||||
|
if ($hasDebugInfo) {
|
||||||
|
try {
|
||||||
|
$debugInfo = $obj->__debugInfo();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// ignore failing __debugInfo()
|
||||||
|
$hasDebugInfo = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$a = $obj instanceof \Closure ? [] : (array) $obj;
|
$a = $obj instanceof \Closure ? [] : (array) $obj;
|
||||||
|
|
||||||
if ($obj instanceof \__PHP_Incomplete_Class) {
|
if ($obj instanceof \__PHP_Incomplete_Class) {
|
||||||
@ -83,7 +92,7 @@ class Caster
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($hasDebugInfo && \is_array($debugInfo = $obj->__debugInfo())) {
|
if ($hasDebugInfo && \is_array($debugInfo)) {
|
||||||
foreach ($debugInfo as $k => $v) {
|
foreach ($debugInfo as $k => $v) {
|
||||||
if (!isset($k[0]) || "\0" !== $k[0]) {
|
if (!isset($k[0]) || "\0" !== $k[0]) {
|
||||||
$k = self::PREFIX_VIRTUAL.$k;
|
$k = self::PREFIX_VIRTUAL.$k;
|
||||||
|
Reference in New Issue
Block a user