Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/fc0e3512f01c5e551d03 to your computer and use it in GitHub Desktop.
Save doctrinebot/fc0e3512f01c5e551d03 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DBAL-44 - https://github.com/doctrine/dbal/issues/1636
Index: DBAL/Types/DecimalType.php
===================================================================
--- DBAL/Types/DecimalType.php (revision 2)
+++ DBAL/Types/DecimalType.php (working copy)
@@ -42,6 +42,6 @@
public function convertToPHPValue($value, AbstractPlatform $platform)
{
- return (double) $value;
+ return null === $value ? null : (double) $value;
}
}
\ No newline at end of file
Index: DBAL/Types/SmallIntType.php
===================================================================
--- DBAL/Types/SmallIntType.php (revision 2)
+++ DBAL/Types/SmallIntType.php (working copy)
@@ -42,7 +42,7 @@
public function convertToPHPValue($value, AbstractPlatform $platform)
{
- return (int) $value;
+ return null === $value ? null : (int) $value;
}
public function getBindingType()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment