Professional Web Applications Themes

#39112 [NEW]: Typographical error in error message - PHP Bugs

From: a at b dot c dot de Operating system: Windows XP PHP version: 5.1.6 PHP Bug Type: PCRE related Bug description: Typographical error in error message Description: ------------ The Warning: level message that is triggered by preg_replace() when the pattern is a string, but the replacement is an array has one or two typos: "in" instead of "is", and a full stop that looks out of place. Reproduce code: --------------- <?php $pattern = "/foo/"; $replacement = array('bar','baz'); $string = "Womble"; preg_replace($pattern, $replacement, $string); ?> Expected result: ---------------- Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an ...

  1. #1

    Default #39112 [NEW]: Typographical error in error message

    From: a at b dot c dot de
    Operating system: Windows XP
    PHP version: 5.1.6
    PHP Bug Type: PCRE related
    Bug description: Typographical error in error message

    Description:
    ------------
    The Warning: level message that is triggered by preg_replace() when the
    pattern is a string, but the replacement is an array has one or two typos:
    "in" instead of "is", and a full stop that looks out of place.

    Reproduce code:
    ---------------
    <?php

    $pattern = "/foo/";
    $replacement = array('bar','baz');
    $string = "Womble";

    preg_replace($pattern, $replacement, $string);
    ?>



    Expected result:
    ----------------
    Warning: preg_replace(): Parameter mismatch, pattern is a string while
    replacement is an array in C:\test.php on line 8

    Actual result:
    --------------
    Warning: preg_replace(): Parameter mismatch, pattern is a string while
    replacement in an array. in C:\test.php on line 8

    --
    Edit bug report at [url]http://bugs.php.net/?id=39112&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39112&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=39112&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=39112&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39112&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=39112&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=39112&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=39112&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=39112&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=39112&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=39112&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39112&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=39112&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=39112&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39112&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=39112&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39112&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39112&r=mysqlcfg[/url]
    a at b dot c dot de Guest

  2. #2

    Default #39112 [Opn->Csd]: Typographical error in error message

    ID: 39112
    Updated by: [email]tony2001php.net[/email]
    Reported By: a at b dot c dot de
    -Status: Open
    +Status: Closed
    Bug Type: PCRE related
    Operating System: Windows XP
    PHP Version: 5.1.6
    New Comment:

    This bug has been fixed in CVS.

    Snapshots of the sources are packaged every three hours; this change
    will be in the next snapshot. You can grab the snapshot at
    [url]http://snaps.php.net/[/url].

    Thank you for the report, and for helping us make PHP better.




    Previous Comments:
    ------------------------------------------------------------------------

    [2006-10-10 12:25:45] a at b dot c dot de

    Description:
    ------------
    The Warning: level message that is triggered by preg_replace() when the
    pattern is a string, but the replacement is an array has one or two
    typos: "in" instead of "is", and a full stop that looks out of place.

    Reproduce code:
    ---------------
    <?php

    $pattern = "/foo/";
    $replacement = array('bar','baz');
    $string = "Womble";

    preg_replace($pattern, $replacement, $string);
    ?>



    Expected result:
    ----------------
    Warning: preg_replace(): Parameter mismatch, pattern is a string while
    replacement is an array in C:\test.php on line 8

    Actual result:
    --------------
    Warning: preg_replace(): Parameter mismatch, pattern is a string while
    replacement in an array. in C:\test.php on line 8


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39112&edit=1[/url]
    tony2001@php.net Guest

Similar Threads

  1. Help! Can not save anything in Illustrator format - Error message "unknown error has occured"
    By Laura_Hernandez@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 7
    Last Post: April 19th, 04:30 AM
  2. How To Supress Acrobat Error Message And Alert Message
    By ckpang@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 10
    Last Post: January 15th, 11:33 AM
  3. error message: Microsoft JScript compilation error '800a03ec'
    By blacksmith77 in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: November 15th, 02:47 PM
  4. Error Message "A drawing error ocurrred which is probably due to an out-of-memory condition. Try qu
    By wendy_matarazzo@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 2
    Last Post: May 11th, 06:12 PM
  5. ODBC has error but no error message displayed
    By Robert Brown in forum ASP.NET General
    Replies: 2
    Last Post: July 3rd, 11:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139