は、誰かがこの問題を助けてくれるのだろうかと疑問に思っていました。このエラーが発生したのは今回が初めてです。php pregmatch - コンパイルに失敗しました。
は警告:するpreg_match()[function.pregマッチ]:コンパイル は失敗しました:何をinrelationは、私のコードのこの部分にある9
オフセットで繰り返す:
(isset($_POST[$post_key]) && $misc[2] === true && ! preg_match($misc[0], $_POST[$post_key]))
と私の完全な(関連するビット)コードは以下のとおりです。次のように
経由で送信されるデータは次のとおりです。
ajax-request true
author 1
epi 2
jbid 781711001327010590
message dfdf
type send-invite
誰もが何らかのその理由や何のエラーの原因を知っていますか?ここでは同じ
case 'send-invite' :
if(free_member_is_logged_in()) {
$post_array = array(
'message' => array(
'#^.*{3,500}$#is',
'<p class="error_message">Please enter a message between 3 and 500 characters.</p>',
true
),
'epi' => array(
'#^[0-9]+$#is',
'<p class="error_message">An internal error has occured. If this problem persists please contact support</p>',
true
),
'author' => array(
'#^[0-9]+$#is',
'<p class="error_message">An internal error has occured. If this problem persists please contact support.</p>',
true
),
'jbid' => array(
'#^[0-9]+$#is',
'<p class="error_message">Please specify a job which you have published.</p>',
true
)
);
$continue = true;
foreach($post_array as $post_key => $misc) {
if(
(! isset($_POST[$post_key]) && $misc[2] === true)
||
(isset($_POST[$post_key]) && $misc[2] === true && ! preg_match($misc[0], $_POST[$post_key]))
||
(isset($_POST[$post_key]) && $misc[2] === false && $_POST[$post_key] != '' && ! preg_match($misc[0], $_POST[$post_key]))
) {
$continue = false;
$error_message = $misc[1];
}
${cleankey($post_key)} = res($_POST[$post_key]);
}
イムばか、歓声、ただアステリックスを削除しました。 –