template-specs: php52.patch (NEW) - initial php embedly spec
glen
glen at pld-linux.org
Thu Jul 28 13:23:13 CEST 2011
Author: glen Date: Thu Jul 28 11:23:13 2011 GMT
Module: template-specs Tag: HEAD
---- Log message:
- initial php embedly spec
---- Files affected:
template-specs:
php52.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: template-specs/php52.patch
diff -u /dev/null template-specs/php52.patch:1.1
--- /dev/null Thu Jul 28 13:23:14 2011
+++ template-specs/php52.patch Thu Jul 28 13:23:08 2011
@@ -0,0 +1,31 @@
+--- php-embedly-0.3.0/src/Embedly/Embedly.orig.php 2011-07-28 13:06:55.917396407 +0300
++++ php-embedly-0.3.0/src/Embedly/Embedly.php 2011-07-28 13:13:54.775979760 +0300
+@@ -1,6 +1,6 @@
+ <?php
+
+-namespace Embedly;
++// namespace Embedly;
+
+ /**
+ *
+@@ -227,7 +227,10 @@
+ sprintf('User-Agent: %s', $this->user_agent)
+ ));
+ $res = $this->curlExec($ch);
+- $result = json_decode($res) ?: array();
++ $result = json_decode($res, true);
++ if (!is_array($result)) {
++ $result = array();
++ }
+ }
+ $merged_result = array();
+ foreach ($result as $i => $v) {
+@@ -334,7 +337,7 @@
+ * @param stdClass $o
+ * @return string
+ */
+- public static function reg_imploder(\stdClass $o)
++ public static function reg_imploder(stdClass $o)
+ {
+ return implode('|', array_map(array(__CLASS__, 'reg_delim_stripper'), $o->regex));
+ }
================================================================
More information about the pld-cvs-commit
mailing list