#39112 [NEW]: Typographical error in error message

Ask a Question related to PHP Bugs, Design and Development.

  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. Similar Questions and Discussions

    1. Help! Can not save anything in Illustrator format - Error message "unknown error has occured"
      I am using Illustrator CS on XP, I was trying to save my work, it was a template and about 10 layers. I got the error message "unknown error has...
    2. error message: Microsoft JScript compilation error '800a03ec'
      Recieved following error message: Microsoft JScript compilation error '800a03ec' Expected ';' ...
    3. Error Message When Sending Message In Windows Mail
      Am I the only one getting an error message when replying to a posted message using Windows Mail. Every time I send a message I get a popup error...
    4. Error Message "A drawing error ocurrred which is probably due to an out-of-memory condition. Try qu
      I am running Acrobat Reader 5.0 on a Mac Powerbook running OS 9.2 and keep getting "A drawing error occurred which is probably due to an out of...
    5. ODBC has error but no error message displayed
      Hi All.. This is a strange one that I hope someone has come across. I have an asp.net application that needs to access a flat file databse via...
  3. #2

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

    ID: 39112
    Updated by: [email]tony2001@php.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

Posting Permissions

  • You may not post new threads
  • You may 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