Skip to content

Instantly share code, notes, and snippets.

View etodanik's full-sized avatar
:octocat:
Fixing an open source bug :)

Danny Povolotski etodanik

:octocat:
Fixing an open source bug :)
View GitHub Profile
<?php
function north_cast_api_data($content) {
if (is_numeric($content)) $content = intval($content);
else {
$unserialized_content = @unserialize($content);
// we got serialized content
if ($unserialized_content !== false) {
// make sure that integers are represented as such, instead of str
foreach ($unserialized_content as $fn => &$c) {