Overview
Comment:Corriger problème lié à conversion de string vide en entier, signalé par @Cédric
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: a6ebca415e8729d3921045ba78ab65761f51db37
User & Date: bohwaz on 2018-10-17 11:07:06
Other Links: branch diff | manifest | tags
Context
2018-10-17
11:14
Vérifions les dépendances dans la mise à jour aussi, au cas où check-in: 50f325e4d7 user: bohwaz tags: dev
11:07
Corriger problème lié à conversion de string vide en entier, signalé par @Cédric check-in: a6ebca415e user: bohwaz tags: dev
2018-10-15
21:53
Correction bug recherche sur texte libre check-in: a4b7d7ada4 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Template.php from [b6b4c087b7] to [1f698e9c13].

368
369
370
371
372
373
374



375
376
377
378
379
380
381
					{
						$binary |= 0x01 << $k;
					}
				}

				$value = $binary;
			}




			foreach ($options as $k=>$v)
			{
				$b = 0x01 << (int)$k;
				$field .= '<label><input type="checkbox" name="' 
					. htmlspecialchars($params['name'], ENT_QUOTES, 'UTF-8') . '[' . (int)$k . ']" value="1" '
					. (($value & $b) ? 'checked="checked"' : '') . ' ' . $attributes . '/> ' 







>
>
>







368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
					{
						$binary |= 0x01 << $k;
					}
				}

				$value = $binary;
			}

			// Forcer la valeur à être un entier (depuis PHP 7.1)
			$value = (int)$value;

			foreach ($options as $k=>$v)
			{
				$b = 0x01 << (int)$k;
				$field .= '<label><input type="checkbox" name="' 
					. htmlspecialchars($params['name'], ENT_QUOTES, 'UTF-8') . '[' . (int)$k . ']" value="1" '
					. (($value & $b) ? 'checked="checked"' : '') . ' ' . $attributes . '/> '