100+ results for 'php unserialize'

Not the results you expected?

acf-meta-functions.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 384 lines

1 <?php

2

3 /**

47 }

48

49 // Unserialized results (get_metadata does not unserialize if $key is empty).

50 $meta = array_map( 'maybe_unserialize', $meta );

Weee.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 200 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

37 * @param \Magento\Sales\Model\Order\Invoice $invoice

38 * @return $this

39 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

40 * @SuppressWarnings(PHPMD.NPathComplexity)

41 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)

42 */

43 public function collect(\Magento\Sales\Model\Order\Invoice $invoice)

95 $taxRatio = [];

96 if ($item->getTaxRatio()) {

97 $taxRatio = unserialize($item->getTaxRatio());

98 }

99 $taxRatio[\Magento\Weee\Model\Total\Quote\Weee::ITEM_TYPE] = $itemWeeeTax / $orderItemWeeeTax;

ArrayObject.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 432 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

398

399 /**

400 * Unserialize an ArrayObject

401 *

402 * @param string $data

403 * @return void

404 */

405 public function unserialize($data)

406 {

407 $ar = unserialize($data);

registry.php (https://github.com/Paladin/joomla-platform.git) PHP · 472 lines

1 <?php

2 /**

3 * @package Joomla.Platform

67 public function __clone()

68 {

69 $this->data = unserialize(serialize($this->data));

70 }

71

89 *

90 * @since 12.2

91 * @note The interface is only present in PHP 5.4 and up.

92 */

93 public function jsonSerialize()

PhpReferenceCompatibility.php (https://gitlab.com/x33n/ImpressPages) PHP · 433 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

20 *

21 * This ArrayObject is a rewrite of the implementation to fix

22 * issues with php's implementation of ArrayObject where you

23 * are unable to unset multi-dimensional arrays because you

24 * need to fetch the properties / lists as references.

25 */

26 abstract class PhpReferenceCompatibility implements IteratorAggregate, ArrayAccess, Serializable, Countable

27 {

28 /**

402

403 /**

404 * Unserialize an ArrayObject

405 *

406 * @param string $data

AbstractTokenTest.php (https://gitlab.com/fabian.morales/marlon_becerra) PHP · 285 lines

1 <?php

2

3 /*

47 }

48

49 public function unserialize($serialized)

50 {

51 list($this->credentials, $parentStr) = unserialize($serialized);

52 parent::unserialize($parentStr);

53 }

54

56 }

57

58 class AbstractTokenTest extends \PHPUnit_Framework_TestCase

59 {

60 public function testGetUsername()

class.splqueue.html (https://bitbucket.org/thncr/manuals.git) HTML · 216 lines

10 <div class="next" style="text-align: right; float: right;"><a href="splqueue.construct.html">SplQueue::__construct</a></div>

11 <div class="up"><a href="spl.datastructures.html">数据结构</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="class.splqueue" class="reference">

14 <h1 class="title">The SplQueue class</h1>

15

16

17 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0)</p>

18

19

161 )</div>

162 <div class="methodsynopsis dc-description">

163 <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="spldoublylinkedlist.unserialize.html" class="methodname">SplDoublyLinkedList::unserialize</a></span>

164 ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$serialized</code></span>

165 )</div>

Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines

1 <?php

2 namespace W3TC;

3

116 $expires_at = time() + $expire;

117 @fputs( $fp, pack( 'L', $expires_at ) );

118 @fputs( $fp, '<?php exit; ?>' );

119 @fputs( $fp, @serialize( $var ) );

120 @fclose( $fp );

136 list( $data, $has_old_data ) = $this->_get_with_old_raw( $key, $group );

137 if ( !empty( $data ) )

138 $data_unserialized = @unserialize( $data );

139 else

140 $data_unserialized = $data;

141

142 return array( $data_unserialized, $has_old_data );

143 }

144

translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines

1 <?php

2

3 /**

118 else {

119 // take care not to overwrite extra data stored in description field, if any

120 $d = unserialize( $term->description );

121 $d = is_array( $d ) ? array_diff_key( $d, $old_translations ) : array(); // remove old translations

122 $d = array_merge( $d, $translations ); // add new one

152

153 if ( ! empty( $term ) ) {

154 $d = unserialize( $term->description );

155 $slug = array_search( $id, $this->get_translations( $id ) ); // in case some plugin stores the same value with different key

156 unset( $d[ $slug ] );

175 public function get_translations( $id ) {

176 $term = $this->get_object_term( $id, $this->tax_translations );

177 $translations = empty( $term ) ? array() : unserialize( $term->description );

178

179 // make sure we return only translations ( thus we allow plugins to store other informations in the array )

AbstractSessionArrayStorage.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 484 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

179

180 /**

181 * Unserialize

182 *

183 * @param string $session

184 * @return mixed

185 */

186 public function unserialize($session)

187 {

188 return unserialize($session);

RouteTest.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 232 lines

1 <?php

2

3 /*

14 use Symfony\Component\Routing\Route;

15

16 class RouteTest extends \PHPUnit_Framework_TestCase

17 {

18 public function testConstructor()

225

226 $serialized = serialize($route);

227 $unserialized = unserialize($serialized);

228

229 $this->assertEquals($route, $unserialized);

230 $this->assertNotSame($route, $unserialized);

231 }

232 }

PlatformJobQueue.php (https://github.com/Exercise/zf2.git) PHP · 318 lines

1 <?php

2 /**

3 * Zend Framework

186 $zendApiJob = new $classname($message);

187

188 // Unfortunately, the Platform JQ API is PHP4-style...

189 $platformJob = $zendApiJob->getJob();

190

299

300 /**

301 * Unserialize

302 *

303 * @return void

ezkeywordtype.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 291 lines

1 <?php

2 /**

3 * File containing the eZKeywordType class.

10

11 /*!

12 \class eZKeywordType ezkeywordtype.php

13 \ingroup eZDatatype

14 \brief A content datatype which handles keyword indexes

273 }

274

275 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )

276 {

277 $keyWordString = $attributeNode->getElementsByTagName( 'keyword-string' )->item( 0 )->textContent;

sfNamespacedParameterHolderTest.php (https://github.com/mrwabu/urlcatcher.git) PHP · 224 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

12

13 $t = new lime_test(54);

211 $t->is($parameters, $ph->getAll(), '->add() adds a reference of an array of parameters');

212

213 // ->serialize() ->unserialize()

214 $t->diag('->serialize() ->unserialize()');

215 $t->ok($ph == unserialize(serialize($ph)), 'sfNamespacedParameterHolder implements the Serializable interface');

216

217 // Array path as a key

content-archive.php (https://gitlab.com/oxidigitaluser/liguelista) PHP · 154 lines

102 <div style="margin-top:5px;">

103 <span style="font-weight: 300;">

104 <a href="http://<?php echo $javo_meta_query->get('website'); ?>" target="_blank" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"><?php echo $javo_meta_query->get('website'); ?></a>

105 </span>

106 </div>

121

122 <div style="float: right;padding-left: 5px;">

123 <?php if ($javo_meta_query->get('phone1') != '' && $javo_meta_query->get('phone1') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone1'); ?></span></div><?php } ?>

124 <?php if ($javo_meta_query->get('phone2') != '' && $javo_meta_query->get('phone2') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone2'); ?></span></div><?php } ?>

125 <?php if ($javo_meta_query->get('phone3') != '' && $javo_meta_query->get('phone3') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone3'); ?></span></div><?php } ?>

126 </div>

127

145

146 <div style="float: right;width: 100%;" class="quebratelefone">

147 <?php if ($javo_meta_query->get('phone0800') != '' && $javo_meta_query->get('phone0800') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone0800'); ?></span></div><?php } ?>

148 </div>

149 </div>

ezrangeoptiontype.php (https://github.com/itag/ezpublish.git) PHP · 276 lines

1 <?php

2 /**

3 * File containing the eZRangeOptionType class.

10

11 /*!

12 \class eZRangeOptionType ezrangeoptiontype.php

13 \ingroup eZDatatype

14 \brief The class eZRangeOptionType does

234 }

235

236 function unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )

237 {

238 $defaultName = $attributeParametersNode->getElementsByTagName( 'default-name' )->item( 0 )->textContent;

253 }

254

255 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )

256 {

257 $rootNode = $attributeNode->getElementsByTagName( 'ezrangeoption' )->item( 0 );

ConfigSchema.php (https://github.com/viggof/moodle.git) PHP · 164 lines

1 <?php

2

3 /**

58

59 /**

60 * Unserializes the default ConfigSchema.

61 */

62 public static function makeFromSerial() {

63 $contents = file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema.ser');

64 $r = unserialize($contents);

65 if (!$r) {

66 $hash = sha1($contents);

PropelCSVParser.php (https://bitbucket.org/aagraz/propel.git) PHP · 314 lines

1 <?php

2

3 /**

11 /**

12 * CSV parser. Converts data between associative array and CSV formats.

13 * CSV parsing code borrowed from php-csv-utils by Luke Visinoni

14 * http://code.google.com/p/php-csv-utils/

247 }

248 if ($this->isSerialized($column)) {

249 $column = $this->unserialize($column);

250 }

251 if ($column === 'N;') {

288

289 /**

290 * Unserializes a value from CSV output

291 *

292 * @param string $input

newpost.php (https://bitbucket.org/seyar/kinda.local.git) PHP · 191 lines

1 <?php defined('SYSPATH') OR die('No direct access allowed.');

2 /* @version $Id: v 0.1 ${date} - ${time} Exp $

3 *

40 else{

41 $return = $result->current();

42 $return['borders'] = unserialize($return['borders']);

43

44 return array_merge($return, $parent);

Renderlet.php (https://github.com/ngocanh/pimcore.git) PHP · 341 lines

1 <?php

2 /**

3 * Pimcore

134 public function setDataFromResource($data) {

135

136 $data = unserialize($data);

137

138 $this->id = $data["id"];

Chain.php (https://github.com/nationalfield/symfony.git) PHP · 422 lines

1 <?php

2 /*

3 * $Id$

28 * @subpackage Record

29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>

30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

31 * @link www.doctrine-project.org

32 * @since 1.0

166 }

167

168 public function preUnserialize(Doctrine_Event $event)

169 {

170 $disabled = $this->getOption('disabled');

171

172 if ($disabled !== true && ! (is_array($disabled) && in_array('preUnserialize', $disabled))) {

173 foreach ($this->_listeners as $listener) {

174 $disabled = $listener->getOption('disabled');

vimeo_source.php (https://github.com/gmimano/newd.git) PHP · 217 lines

1 <?php

2 /**

3 * Vimeo Datasource 0.1

12 * @author Jon (pointlessjon) Adams <jon@anti-gen.com>

13 * @copyright (c) n/a

14 * @link http://github.com/pointlessjon/CakePHP-Vimeo-Datasource/tree/master

15 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

209 function __vimeoApiRequest($data = null) {

210 if (!empty($data)) {

211 return unserialize($this->Http->get("http://vimeo.com/api/{$data}.php", null));

212 }

213 return false;

User.php (https://github.com/hukumonline/quart80.git) PHP · 278 lines

1 <?php

2

3 /**

185 /**

186 * Serializes properties and returns them as a string which can later on

187 * be unserialized.

188 *

189 * @return string

197

198 /**

199 * Unserializes <tt>$serialized</tt> and assigns the specific

200 * values found to the members in this class.

201 *

203 * instance of this class.

204 */

205 public function unserialize($serialized)

206 {

207 $str = unserialize($serialized);

em-notices.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 238 lines

1 <?php

2 /**

3 *

13 $notices = base64_decode($_COOKIE['em_notices']);

14 if( is_serialized( $notices ) ){

15 $this->notices = unserialize($notices);

16 setcookie('em_notices', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), true); //unset the cookie

17 }

FileStore.php (https://gitlab.com/techniconline/kmc) PHP · 247 lines

1 <?php namespace Illuminate\Cache;

2

3 use Exception;

74 }

75

76 $data = unserialize(substr($contents, 10));

77

78 // Next, we'll extract the number of minutes that are remaining for a cache

QueueFake.php (https://gitlab.com/jjpa2018/dashboard) PHP · 414 lines

1 <?php

2

3 namespace Illuminate\Support\Testing\Fakes;

8 use Illuminate\Queue\QueueManager;

9 use Illuminate\Support\Traits\ReflectsClosures;

10 use PHPUnit\Framework\Assert as PHPUnit;

11

12 class QueueFake extends QueueManager implements Queue

38 }

39

40 PHPUnit::assertTrue(

41 $this->pushed($job, $callback)->count() > 0,

42 "The expected [{$job}] job was not pushed."

55 $count = $this->pushed($job)->count();

56

57 PHPUnit::assertSame(

58 $times, $count,

59 "The expected [{$job}] job was pushed {$count} times instead of {$times} times."

class-itsec-logger-all-logs.php (https://gitlab.com/najomie/fit-hippie) PHP · 260 lines

1 <?php

2

3 /**

73 **/

74 function column_host( $item ) {

75 require_once( ITSEC_Core::get_core_dir() . '/lib/class-itsec-lib-ip-tools.php' );

76

77 $r = array();

101

102 if ( 0 != $item['user_id'] ) {

103 return '<a href="' . esc_url( admin_url( 'user-edit.php?user_id=' . $item['user_id'] ) ) . '" target="_blank" rel="noopener noreferrer">' . $item['user'] . '</a>';

104 } else {

105 return $item['user'];

148 global $itsec_logger;

149

150 $raw_data = maybe_unserialize( $item['data'] );

151

152 $data = apply_filters( "itsec_logger_filter_{$item['type']}_data_column_details", '', $raw_data );

class-wc-order-item-shipping.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 319 lines

1 <?php

2 /**

3 * Order Line Item (shipping)

132 */

133 public function set_taxes( $raw_tax_data ) {

134 $raw_tax_data = maybe_unserialize( $raw_tax_data );

135 $tax_data = array(

136 'total' => array(),

PermanentCache.php (https://bitbucket.org/valmy/openx.git) PHP · 167 lines

1 <?php

2

3 /*

26 */

27

28 require_once 'Cache/Lite.php';

29

30 /**

83

84 if ($result = $this->oCache->get($id, $group, true)) {

85 return unserialize(gzuncompress($result));

86 }

87 }

SurveyDBClass.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 732 lines

1 <?php

2

3 /**

6 * @since 0.1

7 *

8 * @file SurveyDBClass.php

9 * @ingroup Survey

10 *

407 case 'array':

408 if ( is_string( $value ) ) {

409 $value = unserialize( $value );

410 }

411 break;

extension.cache.mysql.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 171 lines

1 <?php

2 /////////////////////////////////////////////////////////////////

3 /// getID3() by James Heinrich <info@getid3.org> //

6 /////////////////////////////////////////////////////////////////

7 // //

8 // extension.cache.mysql.php - part of getID3() //

9 // Please see readme.txt for more information //

10 // ///

20 * way as the getID3 class, but return cached information very fast

21 *

22 * Example: (see also demo.cache.mysql.php in /demo/)

23 *

24 * Normal getID3 usage (example):

25 *

26 * require_once 'getid3/getid3.php';

27 * $getID3 = new getID3;

28 * $getID3->encoding = 'UTF-8';

Serializer.php (https://github.com/erochest/Omeka.git) PHP · 313 lines

1 <?php

2

3 class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache

71 return false;

72 }

73 return unserialize(file_get_contents($file));

74 }

75

98 $dir = $this->generateDirectoryPath($config);

99 $dh = opendir($dir);

100 // Apparently, on some versions of PHP, readdir will return

101 // an empty string if you pass an invalid argument to readdir.

102 // So you need this test. See #49.

290 $chmod = $chmod | 0070;

291 } else {

292 // PHP's probably running as nobody, so we'll

293 // need to give global permissions

294 $chmod = $chmod | 0777;

Rewrite.php (https://github.com/temperatio/OSClass.git) PHP · 175 lines

1 <?php if ( ! defined('ABS_PATH')) exit('ABS_PATH is not loaded. Direct access is not allowed.');

2

3 /*

52 public function getRules()

53 {

54 return unserialize(osc_rewrite_rules()) ;

55 }

56

118 public function extractURL($uri = '')

119 {

120 $uri_array = explode('?', str_replace('index.php', '', $uri));

121 if(substr($uri_array[0], 0, 1)=="/") {

122 return substr($uri_array[0], 1);

openid_db_store.php (https://github.com/F5/zetacomponents.git) PHP · 310 lines

1 <?php

2 /**

3 * File containing the ezcAuthenticationOpenidDbStore class.

249

250 /**

251 * Returns the unserialized association linked to the OpenID provider URL.

252 *

253 * Returns false if the association could not be retrieved or if it expired.

275 {

276 $rows = $rows[0];

277 $data = unserialize( $rows[$table['fields']['association']] );

278

279 return $data;

elementproperty.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 402 lines

1 <?php

2 /**

3 * Bitrix Framework

83 {

84 if ($row["USER_TYPE_SETTINGS"])

85 $row["USER_TYPE_SETTINGS"] = unserialize($row["USER_TYPE_SETTINGS"]);

86

87 $properties[$row["ID"]] = $row;

model.php (https://github.com/DoFken/forkcms.git) PHP · 384 lines

1 <?php

2

3 /*

279 if(isset($setting['value']))

280 {

281 return unserialize($setting['value']);

282 }

283 }

session.php (https://github.com/zelu/core.git) PHP · 434 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * Base session class.

312 }

313

314 // Unserialize the data

315 $data = unserialize($data);

Storage.php (https://github.com/jmarien/phpBayeux.git) PHP · 316 lines

1 <?php

2

3 /**

48 $clientPath = $this->_cacheBackend . DIRECTORY_SEPARATOR . 'client_'.$clientid;

49 //_log(' '.__FILE__.' '.__LINE__.' | get client info from '.$clientPath);

50 $clientinfo = unserialize(file_get_contents($clientPath));

51 if (isset($clientinfo[$channel])) {

52 $lastid = $clientinfo[$channel];

87 //_log(' '.__FILE__.' '.__LINE__.' | get client info from '.$clientPath);

88 if (file_exists($clientPath)) {

89 $clientinfo = unserialize(file_get_contents($clientPath));

90 return($clientinfo);

91 }

114 case 'file':

115 $clientPath = $this->_cacheBackend . DIRECTORY_SEPARATOR . 'client_'.$clientid;

116 $clientinfo = unserialize(file_get_contents($clientPath));

117 foreach($clientinfo as $channel => $id) {

118 $this->setChannel($channel);

update.class.php (https://gitlab.com/webkod3r/tripolis) PHP · 234 lines

1 <?php

2 /**

3 * @author ThemePunch <info@themepunch.com>

11

12 private $plugin_url = 'http://codecanyon.net/item/slider-revolution-responsive-wordpress-plugin/2751380';

13 private $remote_url = 'http://updates.themepunch.tools/check_for_updates.php';

14 private $remote_url_info = 'http://updates.themepunch.tools/revslider/revslider.php';

15 private $plugin_slug = 'revslider';

16 private $plugin_path = 'revslider/revslider.php';

17 private $version;

18 private $plugins;

81 $data = $data ? $data : new stdClass;

82

83 $this->data = is_object($data) ? $data : maybe_unserialize($data);

84

85 }

ezbirthdaytype.php (https://bitbucket.org/thinkwalsh/think-walsh-datatypes.git) PHP · 356 lines

1 <?php

2

3 class eZBirthdayType extends eZDataType

299 }

300

301 function unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )

302 {

303

PHPreprocessor.php (https://github.com/constructions-incongrues/phpreprocessor.git) PHP · 214 lines

1 <?php

2 namespace Com\AramisAuto;

3

4 class PHPreprocessor

5 {

6 /**

60

61 // Output results

62 $file = new \SplFileObject('php://stdout', 'w');

63 $file->fwrite($this->_generateProperties($tokens));

64 }

71 $files = $this->_findDistFiles($options['src']);

72

73 // Unserialize tokens

74 $tokensFiles = explode(',', $options['properties']);

75 $tokens = array();

openid_file_store.php (https://github.com/F5/zetacomponents.git) PHP · 301 lines

1 <?php

2 /**

3 * File containing the ezcAuthenticationOpenidFileStore class.

244

245 /**

246 * Returns the unserialized association linked to the OpenID provider URL.

247 *

248 * Returns false if the association could not be retrieved or if it expired.

260 }

261

262 $data = unserialize( file_get_contents( $file ) );

263 return $data;

264 }

File.php (https://github.com/leerbag/zf2.git) PHP · 209 lines

1 <?php

2 /**

3 * Zend Framework

157 * @param string $id Cache id

158 * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested

159 * @param boolean $doNotUnserialize Do not serialize (even if automatic_serialization is true) => for internal use

160 * @return mixed|false Cached datas

161 */

162 public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false)

163 {

164 if (!$doNotTestCacheValidity) {

165 if ($this->test($id)) {

166 return parent::load($id, true, $doNotUnserialize);

167 }

168 return false;

User.php (https://github.com/xoops-pi/engine.git) PHP · 180 lines

1 <?php

2 /**

3 * XOOPS user meta registry

29 * @copyright Xoops Engine http://www.xoopsengine.org/

30 * @license http://www.fsf.org/copyleft/gpl.html GNU public license

31 * @author Taiwen Jiang <phppp@users.sourceforge.net>

32 * @since 3.0

33 * @package Xoops_Core

50 $view["method"] = array($row->module . "_profile", $row->view);

51 } elseif (!empty($row->options)) {

52 $view["options"] = unserialize($row->options);

53 }

54

64 }

65 if (!empty($input)) {

66 $input = unserialize($input);

67 if (is_string($input) && !empty($input)) {

68 $input = array("type" => $input);

model.php (https://github.com/zakgrant/forkcms.git) PHP · 394 lines

1 <?php

2

3 /**

153 array($id));

154

155 // loop settings and unserialize them

156 foreach($user['settings'] as &$value) $value = unserialize($value);

269 array('nickname', 'Y', 'N'), 'id');

270

271 // loop users & unserialize

272 foreach($users as &$value) $value = unserialize($value);

Profiler.php (https://github.com/xbojer/gfw.git) PHP · 243 lines

1 <?php

2

3 /*

123 public function import($data)

124 {

125 $profile = unserialize(base64_decode($data));

126

127 if ($this->storage->read($profile->getToken())) {

175

176 // forces collectors to become "read/only" (they loose their object dependencies)

177 $profile->addCollector(unserialize(serialize($collector)));

178 }

179

Snapshot.php (https://gitlab.com/ppapadatis/products-management-platform) PHP · 419 lines

1 <?php

2 /*

3 * This file is part of the GlobalState package.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

311 $this->canBeSerialized($GLOBALS[$key]) &&

312 !$this->blacklist->isGlobalVariableBlacklisted($key)) {

313 $this->globalVariables[$key] = unserialize(serialize($GLOBALS[$key]));

314 }

315 }

327 if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) {

328 foreach ($GLOBALS[$superGlobalArray] as $key => $value) {

329 $this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value));

330 }

331 }

basic.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 168 lines

1 <?php

2 /**

3 * File containing the ezcWebdavBasicPathFactory class.

41 *

42 * Those will get a '/' appended on re-serialization. Works only if they

43 * had been unserialized before.

44 *

45 * @var array(string=>bool)

106 public function parseUriToPath( $uri )

107 {

108 $requestPath = parse_url( trim( $uri ), PHP_URL_PATH );

109

110 $requestPath = str_replace( '//', '/', $requestPath );

133

134 // Attach fragment to avoid performing operations occasionally

135 if ( ( $frag = parse_url( $uri, PHP_URL_FRAGMENT ) ) !== null )

136 {

137 $requestPath .= "#$frag";

LaminasPriorityQueueStub.php (https://github.com/Sylius/Sylius.git) PHP · 348 lines

1 <?php

2

3 /**

18 use function serialize;

19 use function sprintf;

20 use function unserialize;

21

22 /**

223

224 /**

225 * Unserialize a string into a PriorityQueue object

226 *

227 * Serialization format is compatible with {@link Laminas\Stdlib\SplPriorityQueue}

230 * @return void

231 */

232 public function unserialize($data)

233 {

234 foreach (unserialize($data) as $item) {

TypeConverter.php (https://bitbucket.org/adek23/type-converter.git) PHP · 508 lines

1 <?php

2 /**

3 * @copyright Copyright 2006-2012, Miles Johnson - http://milesj.me

4 * @license http://opensource.org/licenses/mit-license.php - Licensed under the MIT License

5 * @link http://milesj.me/code/php/type-converter

110 */

111 public static function isSerialized($data) {

112 $ser = @unserialize($data);

113

114 return ($ser !== false) ? $ser : false;

ClassMetadataTest.php (https://gitlab.com/pr0055/symfonypizza) PHP · 298 lines

1 <?php

2

3 /*

19 use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint;

20

21 class ClassMetadataTest extends \PHPUnit_Framework_TestCase

22 {

23 const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';

229 $this->metadata->addGetterConstraint('lastName', new ConstraintB());

230

231 $metadata = unserialize(serialize($this->metadata));

232

233 $this->assertEquals($this->metadata, $metadata);

Test.php (https://github.com/koala-framework/koala-framework.git) PHP · 253 lines

1 <?php

2 /**

3 * @group Form_MultiFields

245

246 $data = $model->getData();

247 $data = unserialize($data[0]['data']);

248 $data = array_values($data['data']);

249 $this->assertEquals(2, count($data));

Pager.php (https://github.com/tobiasstrebitzer/SonataAdminBundle.git) PHP · 611 lines

1 <?php

2

3 /*

557

558 /**

559 * Unserialize a pager object

560 *

561 * @param string $serialized

562 */

563 public function unserialize($serialized)

564 {

565 $array = unserialize($serialized);

SessionTest.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 208 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

23 * @subpackage integration_tests

24 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

25 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

26 */

27

28 class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase

29 {

30 /**

Input.php (https://gitlab.com/dleonov/my-framework-two) PHP · 419 lines

1 <?php

2

3 /**

354

355 /**

356 * Method to unserialize the input.

357 *

358 * @param string $input The serialized input.

362 * @since 12.1

363 */

364 public function unserialize($input)

365 {

366 // Unserialize the options, data, and inputs.

367 list($this->options, $this->data, $this->inputs) = unserialize($input);

368

369 // Load the filter.

InfoTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 255 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

10 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;

11

12 class InfoTest extends \PHPUnit_Framework_TestCase

13 {

14 /** @var \Magento\Payment\Model\InfoInterface */

18 protected $objectManagerHelper;

19

20 /** @var \Magento\Framework\Model\Context|\PHPUnit_Framework_MockObject_MockObject */

21 protected $contextMock;

22

23 /** @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */

24 protected $registryMock;

25

Minsaleqty.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 208 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_CatalogInventory

23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

82 } else if (is_string($value) && !empty($value)) {

83 try {

84 return Mage::helper('core/unserializeArray')->unserialize($value);

85 } catch (Exception $e) {

86 return array();

revisions.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 457 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

253 }

254

255 // value has not yet been 'maybe_unserialize'

256 $value = maybe_unserialize( $value );

ReflectionFunctionTest.php (https://github.com/cgmartin/zf2.git) PHP · 189 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

15 * @group Zend_Server

16 */

17 class ReflectionFunctionTest extends \PHPUnit_Framework_TestCase

18 {

19 public function test__construct()

117 $r = new Reflection\ReflectionFunction($function);

118 $s = serialize($r);

119 $u = unserialize($s);

120 $this->assertTrue($u instanceof Reflection\ReflectionFunction);

121 $this->assertEquals('', $u->getNamespace());

Translate.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 490 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

11 * Translate library

12 *

13 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

14 * @SuppressWarnings(PHPMD.TooManyFields)

124 * @param \Magento\Framework\App\Language\Dictionary $packDictionary

125 *

126 * @SuppressWarnings(PHPMD.ExcessiveParameterList)

127 */

128 public function __construct(

473 $data = $this->_cache->load($this->getCacheId());

474 if ($data) {

475 $data = unserialize($data);

476 }

477 return $data;

IniReaderTest.php (https://github.com/kunit/cakephp.git) PHP · 306 lines

5 * PHP 5

6 *

7 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>

8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

13 *

14 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

15 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests

16 * @package Cake.Test.Case.Configure

17 * @since CakePHP(tm) v 2.0

29

30 /**

31 * Test data to serialize and unserialize.

32 *

33 * @var array

widget_m.php (https://github.com/JamieLomas/pyrocms.git) PHP · 332 lines

1 <?php defined('BASEPATH') OR exit('No direct script access allowed');

2 /**

3 * @package PyroCMS

29 if ($result)

30 {

31 $this->unserialize_fields($result);

32 }

33

49 if ($result)

50 {

51 array_map(array($this, 'unserialize_fields'), $result);

52 }

53

75 if ($result)

76 {

77 array_map(array($this, 'unserialize_fields'), $result);

78 }

79

Poll.php (https://github.com/daohoangson/DTUI_201105.git) PHP · 398 lines

1 <?php

2

3 /**

110 'response' => $response['response'],

111 'response_vote_count' => $response['response_vote_count'],

112 'voters' => unserialize($response['voters'])

113 );

114 }

151 if (!is_array($responses))

152 {

153 $responses = unserialize($responses);

154 }

155 if (!is_array($responses))

Abstract.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 281 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Bundle

23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

197 }

198 if (isset($options['bundle_selection_attributes'])) {

199 return unserialize($options['bundle_selection_attributes']);

200 }

201 return null;

Item.php (https://github.com/timglabisch/pimcore.git) PHP · 387 lines

1 <?php

2 /**

3 * Pimcore

89

90 $raw = file_get_contents($this->getStoreageFile());

91 $element = Pimcore_Tool_Serialize::unserialize($raw);

92

93 // check for element with the same name

Queue.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 195 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Core

23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26 class Mage_Core_Model_Resource_Email_Queue extends Mage_Core_Model_Resource_Db_Abstract

36

37 /**

38 * Load recipients, unserialize message parameters

39 *

40 * @param Mage_Core_Model_Abstract $object

SessionTest.php (https://github.com/israelnoguera/parejas.git) PHP · 232 lines

1 <?php

2

3 /*

21 * @author Robert Schönthal <seroscho@googlemail.com>

22 */

23 class SessionTest extends \PHPUnit_Framework_TestCase

24 {

25 protected $storage;

135 $this->assertSame($compare, $this->session->serialize());

136

137 $this->session->unserialize($compare);

138

139 $_storage = new \ReflectionProperty(get_class($this->session), 'storage');

Route.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 594 lines

1 <?php

2

3 /*

109 }

110

111 public function unserialize($data)

112 {

113 $data = unserialize($data);

Sql.php (https://github.com/ewandor/horde.git) PHP · 319 lines

1 <?php

2 /**

3 * Ingo_Storage_Filters_Sql is the object used to hold user-defined filtering

61 'action-value' => Horde_String::convertCharset($row['rule_value'], $this->_params['charset'], 'UTF-8'),

62 'flags' => (int)$row['rule_flags'],

63 'conditions' => empty($row['rule_conditions']) ? null : Horde_String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset'], 'UTF-8'),

64 'combine' => (int)$row['rule_combine'],

65 'stop' => (bool)$row['rule_stop'],

69

70 if (empty($data) && !$readonly) {

71 $data = @unserialize($GLOBALS['prefs']->getDefault('rules'));

72 if ($data) {

73 foreach ($data as $val) {

ContextListener.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 176 lines

1 <?php

2

3 /*

82 }

83

84 $token = unserialize($token);

85

86 if (null !== $this->logger) {

SerializerTest.php (https://github.com/leerbag/zf2.git) PHP · 138 lines

1 <?php

2 /**

3 * Zend Framework

39 * @license http://framework.zend.com/license/new-bsd New BSD License

40 */

41 class SerializerTest extends \PHPUnit_Framework_TestCase

42 {

43 public function setUp()

70 public function testFactoryValidCall()

71 {

72 $serializer = Serializer::factory('PhpSerialize');

73 $this->assertTrue($serializer instanceof Adapter\PHPSerialize);

97 public function testChangeDefaultAdapterWithInstance()

98 {

99 $newAdapter = new Adapter\PhpSerialize();

100

101 Serializer::setDefaultAdapter($newAdapter);

widget_m.php (https://github.com/ekoisa/pyrocms.git) PHP · 332 lines

1 <?php defined('BASEPATH') OR exit('No direct script access allowed');

2 /**

3 * Model to handle widgets

29 if ($result)

30 {

31 $this->unserialize_fields($result);

32 }

33

49 if ($result)

50 {

51 array_map(array($this, 'unserialize_fields'), $result);

52 }

53

75 if ($result)

76 {

77 array_map(array($this, 'unserialize_fields'), $result);

78 }

79

JsonTest.php (https://github.com/zucchi/zf2.git) PHP · 165 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

19 * @group Zend_Serializer

20 */

21 class JsonTest extends \PHPUnit_Framework_TestCase

22 {

23 /**

97 }

98

99 public function testUnserializeString()

100 {

101 $value = '"test"';

102 $expected = 'test';

103

104 $data = $this->adapter->unserialize($value);

105 $this->assertEquals($expected, $data);

106 }

AclTest.php (https://gitlab.com/Isaki/le331.fr) PHP · 206 lines

1 <?php

2

3 /**

183 }

184

185 public function testSerializeUnserialize()

186 {

187 $collection = new \PropelObjectCollection();

197 $acl = new Acl($collection, $this->getAclObjectIdentity(), new PermissionGrantingStrategy());

198 $serialized = serialize($acl);

199 $unserialized = unserialize($serialized);

200

201 $this->assertNotEmpty($serialized);

202 $this->assertNotEmpty($unserialized);

203 $this->assertInstanceOf('Propel\PropelBundle\Security\Acl\Domain\Acl', $unserialized);

Sql.php (https://github.com/finger2000/horde.git) PHP · 319 lines

1 <?php

2 /**

3 * Ingo_Storage_Filters_Sql is the object used to hold user-defined filtering

5 *

6 * See the enclosed file LICENSE for license information (ASL). If you

7 * did not receive this file, see http://www.horde.org/licenses/asl.php.

8 *

9 * @author Jan Schneider <jan@horde.org>

61 'action-value' => Horde_String::convertCharset($row['rule_value'], $this->_params['charset'], 'UTF-8'),

62 'flags' => (int)$row['rule_flags'],

63 'conditions' => empty($row['rule_conditions']) ? null : Horde_String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset'], 'UTF-8'),

64 'combine' => (int)$row['rule_combine'],

65 'stop' => (bool)$row['rule_stop'],

69

70 if (empty($data) && !$readonly) {

71 $data = @unserialize($GLOBALS['prefs']->getDefault('rules'));

72 if ($data) {

73 foreach ($data as $val) {

Serializer.php (https://github.com/kennethjiang/Wolke.git) PHP · 171 lines

1 <?php

2

3 class HTMLPurifier_DefinitionCache_Serializer extends

31 $file = $this->generateFilePath($config);

32 if (!file_exists($file)) return false;

33 return unserialize(file_get_contents($file));

34 }

35

152 $chmod = '775';

153 } else {

154 // PHP's probably running as nobody, so we'll

155 // need to give global permissions

156 $chmod = '777';

phpserializer.js (https://gitlab.com/ign/bahra) JavaScript · 324 lines

1 /* phpserializer.js - JavaScript to PHP serialize / unserialize class.

2 *

3 * This class is designed to convert php variables to javascript

4 * and javascript variables to php with a php serialize unserialize

5 * compatible way.

6 *

182 }

183

184 function unserialize(ss) {

185 var p = 0, ht = [], hv = 1; r = null;

186 function unser_null() {

234 default: return false;

235 }

236 a[k] = __unserialize();

237 }

238 p++;

ServiceDescription.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 329 lines

1 <?php

2

3 namespace Guzzle\Service\Description;

106

107 /**

108 * Unserialize the service description

109 *

110 * @param string|array $json JSON data

111 */

112 public function unserialize($json)

113 {

114 $this->operations = array();

AclCache.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 239 lines

1 <?php

2

3 namespace Doctrine\Bundle\DoctrineCacheBundle\Acl\Model;

126

127 /**

128 * Unserialize a given ACL.

129 *

130 * @param string $serialized

132 * @return \Symfony\Component\Security\Acl\Model\AclInterface

133 */

134 private function unserializeAcl($serialized)

135 {

136 $acl = unserialize($serialized);

235 $serialized = $this->cache->fetch($key);

236

237 return $this->unserializeAcl($serialized);

238 }

239 }

XCache_xcache.php (https://bitbucket.org/xperez/xcache.git) PHP · 197 lines

1 <?php

2 /**

3 * XCache XCache Caching Class

60 return TRUE;

61

62 return unserialize($cache);

63

64 }

173 if ( ! extension_loaded('xcache') OR ini_get('xcache.size') == "0")

174 {

175 self::logMessage('error', 'The XCACHE PHP extension must be loaded to use XCache Cache.');

176 return FALSE;

177 }

193 // End Class

194

195 /* End of file Cache_memcache.php */

196 /* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */

PredisStore.php (https://gitlab.com/BeS/io.schiessle.org) PHP · 211 lines

1 <?php

2

3 /**

4 * Supplies Redis server store backend for OpenID servers and consumers.

5 * Uses Predis library {@see https://github.com/nrk/predis}.

6 * Requires PHP >= 5.3.

7 *

8 * LICENSE: See the COPYING file included in this distribution.

18 * Import the interface for creating a new store class.

19 */

20 require_once 'Auth/OpenID/Interface.php';

21

22 /**

23 * Supplies Redis server store backend for OpenID servers and consumers.

24 * Uses Predis library {@see https://github.com/nrk/predis}.

25 * Requires PHP >= 5.3.

26 *

27 * @package OpenID

Session.class.php (https://gitlab.com/llwhois/woaimm) PHP · 628 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

9 // | Author: liu21st <liu21st@gmail.com>

10 // +----------------------------------------------------------------------

11 // $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $

12

13 define("HTTP_SESSION_STARTED", 1);

22 * @subpackage Util

23 * @author liu21st <liu21st@gmail.com>

24 * @version $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $

25 +------------------------------------------------------------------------------

26 */

Response.php (https://bitbucket.org/Alex_PK/tasty.git) PHP · 359 lines

1 <?php

2

3 namespace Tasty\Response;

335 }

336

337 public function unserialize($serialized)

338 {

339 $this->_data = unserialize($serialized);

Chain.php (https://github.com/proyectoalba/alba.git) PHP · 223 lines

1 <?php

2 /*

3 * $Id$

17 * This software consists of voluntary contributions made by many individuals

18 * and is licensed under the LGPL. For more information, see

19 * <http://www.phpdoctrine.org>.

20 */

21

28 * @subpackage Record

29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>

30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

31 * @link www.phpdoctrine.org

103 }

104

105 public function preUnserialize(Doctrine_Event $event)

106 {

107 foreach ($this->_listeners as $listener) {

RevisionTest.php (https://gitlab.com/link233/bootmw) PHP · 493 lines

1 <?php

2

3 /**

71 */

72 public function testGetRevisionTextGzip() {

73 $this->checkPHPExtension( 'zlib' );

74

75 $row = new stdClass;

111 */

112 public function testGetRevisionTextUtf8NativeGzip() {

113 $this->checkPHPExtension( 'zlib' );

114

115 $row = new stdClass;

126 */

127 public function testGetRevisionTextUtf8LegacyGzip() {

128 $this->checkPHPExtension( 'zlib' );

129

130 $row = new stdClass;

TokenUtils.php (https://gitlab.com/iamgraeme/royalmile) PHP · 300 lines

1 <?php

2 namespace WebSharks\ZenCache;

3

35 } else { // For the current blog ID.

36 $token = $self->domainMappingUrlFilter($self->currentUrl());

37 $token = $self->parseUrl($token, PHP_URL_HOST);

38 }

39 }

156 $self->hostDirToken = function ($dashify = false, $consider_domain_mapping = false, $path = null) use ($self) {

157 if (!isset($path)) { // Use current/default path?

158 $path = (string) $self->parseUrl($_SERVER['REQUEST_URI'], PHP_URL_PATH);

159 }

160 $path = '/'.ltrim((string) $path, '/'); // Force leading slash.

185 if ($token !== '/') { // Perhaps NOT the main site?

186 $blog_paths_file = $self->cacheDir().'/'.strtolower(SHORT_NAME).'-blog-paths';

187 if (!is_file($blog_paths_file) || !in_array($token, unserialize(file_get_contents($blog_paths_file)), true)) {

188 $token = '/'; // NOT a real/valid child blog path.

189 }

Entry.php (https://github.com/Exercise/symfony.git) PHP · 208 lines

1 <?php

2

3 /*

195 * @param string $serialized

196 */

197 public function unserialize($serialized)

198 {

199 list($this->mask,

204 $this->auditSuccess,

205 $this->granting

206 ) = unserialize($serialized);

207 }

208 }

tourinfrance_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 216 lines

1 <?php

2 function traiter_donnees_tourinfrance($url_flux, $id_flux, $infos_flux, $update_flux=false) {

3

6 $xml = simplexml_load_file($url_flux);

7

8 $tab_infos_flux = unserialize($infos_flux);

9

10

75 function inserer_donnees_tourinfrance($id_flux, $commun_srlz, $extra_srlz) {

76

77 $commun = unserialize($commun_srlz);

78 $extra = unserialize($extra_srlz);

BigInt.php (https://github.com/grandison/budo16.git) PHP · 313 lines

18 * @author Alexander Valyalkin <valyala@gmail.com>

19 * @copyright 2005, 2006 Alexander Valyalkin

20 * @license http://www.php.net/license/3_0.txt PHP License 3.0

21 * @version 1.2.0b

22 * @link http://pear.php.net/package/Crypt_RSA

28 * Provides set of math functions, which are used by Crypt_RSA package

29 * This class is a wrapper for big_int PECL extension,

30 * which could be loaded from http://pecl.php.net/packages/big_int

31 *

32 * @category Encryption

34 * @author Alexander Valyalkin <valyala@gmail.com>

35 * @copyright 2005, 2006 Alexander Valyalkin

36 * @license http://www.php.net/license/3_0.txt PHP License 3.0

37 * @link http://pear.php.net/package/Crypt_RSA

60 {

61 if (!extension_loaded('big_int')) {

62 if (!@dl('big_int.' . PHP_SHLIB_SUFFIX) && !@dl('php_big_int.' . PHP_SHLIB_SUFFIX)) {

63 // cannot load big_int extension

64 $this->errstr = 'Crypt_RSA package requires big_int PECL package. ' .

PREPAID.php (https://github.com/axxtel/agilebill.git) PHP · 154 lines

1 <?php

2

3 /**

19 */

20

21 require_once PATH_MODULES.'voip/base_voip_plugin.inc.php';

22

23 class plgn_prov_PREPAID extends base_voip_plugin

38 {

39 // check if prepaid type is ani or pin, if so, escape:

40 $unserial = unserialize($product->fields['prod_plugin_data']);

41 if(!empty($unserial['type']) && ( $unserial['type']=='ani' || $unserial['type']=='pin' ) ) return true;

42

63 {

64 # todo: check that the pin is random!

65 include_once(PATH_MODULES.'voip_prepaid/voip_prepaid.inc.php');

66 $prepaid= new voip_prepaid;

67

DoctrineAclCache.php (https://github.com/nattaphat/hgis.git) PHP · 223 lines

1 <?php

2

3 /*

107 }

108

109 return $this->unserializeAcl($this->cache->fetch($key));

110 }

111

120 }

121

122 return $this->unserializeAcl($this->cache->fetch($key));

123 }

124

142

143 /**

144 * Unserializes the ACL.

145 *

146 * @param string $serialized

File.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 164 lines

1 <?php

2 /**

3 * SimplePie

4 *

5 * A PHP-Based RSS and Atom Feed Framework.

6 * Takes the hard work out of managing a complete RSS/Atom solution.

7 *

39 * @author Ryan McCue

40 * @link http://simplepie.org/ SimplePie

41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

42 */

43

124 if (file_exists($this->name) && is_readable($this->name))

125 {

126 return unserialize(file_get_contents($this->name));

127 }

128 return false;

User.php (https://github.com/intraweb-modules13/IWmenu.git) PHP · 100 lines

1 <?php

2

3 class IWmenu_Api_User extends Zikula_AbstractApi {

38 $sv = ModUtil::func('IWmain', 'user', 'genSecurityValue');

39

40 $iconbase = 'index.php?module=IWmenu&func=getFile&fileName=' . ModUtil::getVar('IWmenu', 'imagedir') . '/';

41

42 $menuitems = Array();

45 $currentLang = ZLanguage::getLanguageCode();

46 foreach ($items as $item) {

47 $itemTextArray = unserialize($item['text']);

48 $item['text'] = (isset($itemTextArray[$currentLang])) ? $itemTextArray[$currentLang] : '';

49 $itemUrlArray = unserialize($item['url']);

76 $url = str_replace('?', '**', $item['url']);

77 $url = str_replace('&', '*', $url);

78 $menuitem['url'] = 'index.php?module=IWwebbox&url=' . $url;

79 $menuitem['target'] = '';

80 } else {

Field.php (https://github.com/quickapps-fr/QuickApps-CMS.git) PHP · 212 lines

1 <?php

2 /**

3 * Field Model

4 *

5 * PHP version 5

6 *

7 * @package QuickApps.Plugin.Field.Model

60 public function beforeSave() {

61 if (isset($this->data['Field']['field_module'])) {

62 $this->data['Field']['settings'] = @unserialize($this->data['Field']['settings']);

63 $before = $this->hook("{$this->data['Field']['field_module']}_before_save_instance", $this);

64 $this->data['Field']['settings'] = !is_array($this->data['Field']['settings']) ? array() : $this->data['Field']['settings'];

Token.php (https://github.com/noelg/symfony-sandbox.git) PHP · 269 lines

1 <?php

2

3 /*

202 * {@inheritdoc}

203 */

204 public function unserialize($serialized)

205 {

206 list($this->user, $this->credentials, $this->authenticated, $this->roles, $this->immutable, $this->providerKey, $this->attributes) = unserialize($serialized);

monitoring_result.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 394 lines

1 <?php

2 interface CBitrixCloudMonitoring_Access extends Iterator, ArrayAccess

3 {

190 foreach($option->getArrayValue() as $testName => $testResult)

191 {

192 $testResult = unserialize($testResult);

193 if (is_array($testResult))

194 {

CapacitanceTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 382 lines

1 <?php

2 /**

3 * @package Zend_Measure

9 * Zend_Measure_Capacitance

10 */

11 require_once 'Zend/Measure/Capacitance.php';

12

13 /**

14 * PHPUnit test case

15 */

16 require_once 'PHPUnit/Framework/TestCase.php';

17

18

21 * @subpackage UnitTests

22 */

23 class Zend_Measure_CapacitanceTest extends PHPUnit_Framework_TestCase

24 {

25

revisions_administrations.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 106 lines

1 <?php

2

3 /***************************************************************************\

97 }

98 effacer_meta('articles_versions');

99 if (!$versions = unserialize($GLOBALS['meta']['objets_versions']))

100 $versions = array();

101 $versions = array_map('table_objet_sql',$versions);

sfNamespacedParameterHolder.class.php (https://github.com/bheneka/gitta.git) PHP · 384 lines

1 <?php

2

3 /*

33 * The default namespace may be overridden at initialization as follows:

34 * <code>

35 * <?php

36 * $mySpecialPH = new sfNamespacedParameterHolder('symfony/special');

37 * ?>

371

372 /**

373 * Unserializes a sfNamespacedParameterHolder instance.

374 *

375 * @param string $serialized A serialized sfNamespacedParameterHolder instance

376 */

377 public function unserialize($serialized)

378 {

379 $data = unserialize($serialized);

Preference.php (https://github.com/reoring/sabel.git) PHP · 282 lines

1 <?php

2

3 /**

9 * @author Mori Reo <mori.reo@sabel.jp>

10 * @copyright 2004-2008 Mori Reo <mori.reo@sabel.jp>

11 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

12 */

13 class Sabel_Preference

219 }

220

221 return unserialize($this->backend->get($key));

222 }

223

247 }

248

249 return unserialize(base64_decode($this->backend->get($key)));

250 }

251

Serializer.php (https://github.com/udotelaar/zf2.git) PHP · 352 lines

1 <?php

2 /**

3 * Zend Framework

137 $serializer = $options->getSerializer();

138 $result = $event->getResult();

139 $result = $serializer->unserialize($result);

140 $event->setResult($result);

141 }

153 $result = $event->getResult();

154 foreach ($result as &$value) {

155 $value = $serializer->unserialize($value);

156 }

157 $event->setResult($result);

170 $item = $event->getResult();

171 if (isset($item['value'])) {

172 $item['value'] = $serializer->unserialize($item['value']);

173 }

174 $event->setResult($item);

db.kvdriver.php (git://github.com/jelix/jelix.git) PHP · 324 lines

1 <?php

2 /**

3 * @package jelix

78

79 foreach ($rs as $rec) {

80 $result[$rec->k_key] = unserialize($rs->unescapeBin($rec->k_value));

81 }

82

94 }

95

96 return unserialize($rs->unescapeBin($result->k_value));

97 }

98

195 return false;

196 }

197 $value = unserialize($rs->unescapeBin($rec->k_value)).$value;

198 $sql = 'UPDATE '.$table.' SET k_value= '.$this->_connection->quote2(serialize($value), false, true).' WHERE k_key='.$key;

199 if ($this->_connection->exec($sql)) {

mmcontroller.php (https://github.com/vmen015/Victor.git) PHP · 154 lines

1 <?php

2

3 class mmcontroller extends controller {

133 if ($this->cache_refresh || $feed === false) {

134 $ch = curl_init();

135 // curl_setopt($ch, CURLOPT_URL, "http://pipes.yahoo.com/pipes/pipe.run?_id=0c92b34341bb61e94f06e4cf8839537c&_render=php");

136 curl_setopt($ch, CURLOPT_URL, $this->config['yahooblogfeeds'][$which]);

137 curl_setopt($ch, CURLOPT_HEADER, 0);

144 }

145

146 $this->data['blogfeed'] = unserialize($feed);

147 } else {

148 $this->data['blogfeed'] = array();

query.php (http://forceworkbench.googlecode.com/svn/trunk/workbench/) PHP · 996 lines ✨ Summary

This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.

65 //query is processed by the correct function

66 if (isset($_POST['queryMore']) && isset($_SESSION['queryLocator'])) {

67 require_once 'header.php';

68 // $queryRequest->setExportTo('screen');

69 displayQueryForm($queryRequest);

102 }

103 } else {

104 require_once 'header.php';

105 if ($queryRequest->getExportTo() == null) $queryRequest->setExportTo('screen');

106 $queryRequest->setQueryAction('Query');

937 if ($records) {

938 try {

939 $csvFile = fopen('php://output','w') or die("Error opening php://output");

940 $csvFilename = "export" . date('YmdHis') . ".csv";

941 header("Content-Type: application/csv");