Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Wallabag\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doc..
Decoded Output download
<?php
namespace Wallabag\Doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\JsonType;
/**
* Removed type from DBAL in v3.
* The type is no more used, but we must keep it in order to avoid error during migrations.
*
* @see https://github.com/doctrine/dbal/commit/6ed32a9a941acf0cb6ad384b84deb8df68ca83f8
* @see https://dunglas.dev/2022/01/json-columns-and-doctrine-dbal-3-upgrade/
*/
class JsonArrayType extends JsonType
{
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if (null === $value || '' === $value) {
return [];
}
$value = \is_resource($value) ? stream_get_contents($value) : $value;
return json_decode($value, true);
}
public function getName()
{
return 'json_array';
}
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return true;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Wallabag\Doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\JsonType;
/**
* Removed type from DBAL in v3.
* The type is no more used, but we must keep it in order to avoid error during migrations.
*
* @see https://github.com/doctrine/dbal/commit/6ed32a9a941acf0cb6ad384b84deb8df68ca83f8
* @see https://dunglas.dev/2022/01/json-columns-and-doctrine-dbal-3-upgrade/
*/
class JsonArrayType extends JsonType
{
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if (null === $value || '' === $value) {
return [];
}
$value = \is_resource($value) ? stream_get_contents($value) : $value;
return json_decode($value, true);
}
public function getName()
{
return 'json_array';
}
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return true;
}
}
Function Calls
None |
Stats
MD5 | 0e303c0a9ef326aa878f85ce6df89a42 |
Eval Count | 0 |
Decode Time | 89 ms |