Skip to content
This repository has been archived by the owner on Mar 17, 2018. It is now read-only.

Commit

Permalink
preg_match returns 0 on no matches
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 24, 2010
1 parent 65edd7c commit 3a82a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/ext.fieldframe.php
Expand Up @@ -397,7 +397,7 @@ function _unserialize($vals, $convert=TRUE)
{
global $REGX, $PREFS;

if ($vals && is_string($vals) && (preg_match('/^(i|s|a|o|d):(.*);/si', $vals) !== FALSE) && ($tmp_vals = @unserialize($vals)) !== FALSE)
if ($vals && is_string($vals) && preg_match('/^(i|s|a|o|d):(.*);/si', $vals) && ($tmp_vals = @unserialize($vals)) !== FALSE)
{
$vals = $REGX->array_stripslashes($tmp_vals);

Expand Down Expand Up @@ -1763,7 +1763,7 @@ function publish_admin_edit_field_save()
global $DB;

// is this a FF fieldtype?
if (preg_match('/^ftype_id_(\d+)$/', $_POST['field_type'], $matches) !== FALSE)
if (preg_match('/^ftype_id_(\d+)$/', $_POST['field_type'], $matches))
{
if (isset($matches[1]))
{
Expand Down

0 comments on commit 3a82a79

Please sign in to comment.