From 1b8a833bd19cbc81da080d89a54f76a869497342 Mon Sep 17 00:00:00 2001
From: Dave Longley <dlongley@digitalbazaar.com>
Date: Mon, 23 Apr 2012 15:15:26 -0400
Subject: [PATCH] Fix number checks.

---
 jsonld.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jsonld.php b/jsonld.php
index df40432..ab1c530 100644
--- a/jsonld.php
+++ b/jsonld.php
@@ -1475,7 +1475,7 @@ class JsonLdProcessor {
             $o = (object)array('@value' => $o, '@type' => self::XSD_DOUBLE);
           }
           // convert integer to @value
-          else if(is_numeric($o)) {
+          else if(is_integer($o)) {
             $o = (object)array(
               '@value' => strval($o), '@type' => self::XSD_INTEGER);
           }
@@ -2367,7 +2367,7 @@ class JsonLdProcessor {
     }
 
     // rank boolean or number
-    if(is_bool($value) || is_numeric($value)) {
+    if(is_bool($value) || is_double($value) || is_integer($value)) {
       if(is_bool($value)) {
         $type = self::XSD_BOOLEAN;
       }