• 20-12-2020, 15:05:14
    #1
    Merhaba kolay gelsin herkese. Resimde yer alan kod içerisindeki hatayı çözebilen var mı? (881-882-883)



  • 20-12-2020, 15:07:14
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Aldığınız hata ne hocam? Ekrana basan hatayı da belirtirseniz ona göre yardımcı olabiliriz.
  • 20-12-2020, 15:09:03
    #3
    /homepublic_html/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 881
    /home/public_html/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 882
    /home/public_html/wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 883

    [07:05:28 UTC] PHP Warning: substr() expects parameter 1 to be string, array given in
  • 20-12-2020, 15:44:12
    #4
    Üyeliği durduruldu
    Prensipte hata gözükmüyor, gelen veride problem olabilir.
    str_replaceden önce $color'u sonrasınada $hex'i ekrana basarmısınız.
    giriş çıkış doğrumu onu görelim.
  • 20-12-2020, 15:49:25
    #5
    oktayWEB adlı üyeden alıntı: mesajı görüntüle
    Prensipte hata gözükmüyor, gelen veride problem olabilir.
    str_replaceden önce $color'u sonrasınada $hex'i ekrana basarmısınız.
    giriş çıkış doğrumu onu görelim.
    Cevap için teşekkürler hocam ama sorunuzu tam olarak anlayamadım. Çok anlamıyorum kod olayından.

  • 20-12-2020, 15:59:22
    #6
    oktayWEB adlı üyeden alıntı: mesajı görüntüle
    Prensipte hata gözükmüyor, gelen veride problem olabilir.
    str_replaceden önce $color'u sonrasınada $hex'i ekrana basarmısınız.
    giriş çıkış doğrumu onu görelim.
    if ( ! function_exists( 'wc_hex_is_light' ) ) {
    /** * Determine whether a hex color is light. * * @param mixed $color Color. * @return bool True if a light color. */ function wc_hex_is_light( $color ) { $hex = str_replace( '#', '', $color );
    $c_r = hexdec( substr( $hex, 0, 2 ) ); $c_g = hexdec( substr( $hex, 2, 2 ) ); $c_b = hexdec( substr( $hex, 4, 2 ) );
    $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;
    return $brightness > 155; }
    }
  • 20-12-2020, 16:07:50
    #7
    Üyeliği durduruldu
    KadirTPT adlı üyeden alıntı: mesajı görüntüle
    if ( ! function_exists( 'wc_hex_is_light' ) ) {
    /** * Determine whether a hex color is light. * * @param mixed $color Color. * @return bool True if a light color. */ function wc_hex_is_light( $color ) { $hex = str_replace( '#', '', $color );
    $c_r = hexdec( substr( $hex, 0, 2 ) ); $c_g = hexdec( substr( $hex, 2, 2 ) ); $c_b = hexdec( substr( $hex, 4, 2 ) );
    $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;
    return $brightness > 155; }
    }
    if ( ! function_exists( 'wc_hex_is_light' ) ) {
    /** * Determine whether a hex color is light. * * @param mixed $color Color. * @return bool True if a light color. */ function wc_hex_is_light( $color ) { echo $color."<br />"; $hex = str_replace( '#', '', $color ); echo $hex."<br />";
    $c_r = hexdec( substr( $hex, 0, 2 ) ); $c_g = hexdec( substr( $hex, 2, 2 ) ); $c_b = hexdec( substr( $hex, 4, 2 ) );
    $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;
    return $brightness > 155; }
    }
    Bu şekilde ekleyip çalıştırın.
  • 20-12-2020, 16:13:19
    #8
    oktayWEB adlı üyeden alıntı: mesajı görüntüle
    if ( ! function_exists( 'wc_hex_is_light' ) ) {
    /** * Determine whether a hex color is light. * * @param mixed $color Color. * @return bool True if a light color. */ function wc_hex_is_light( $color ) { echo $color."<br />"; $hex = str_replace( '#', '', $color ); echo $hex."<br />";
    $c_r = hexdec( substr( $hex, 0, 2 ) ); $c_g = hexdec( substr( $hex, 2, 2 ) ); $c_b = hexdec( substr( $hex, 4, 2 ) );
    $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;
    return $brightness > 155; }
    }
    Bu şekilde ekleyip çalıştırın.
    Web sitenizde kritik bir hata oluştu.
    WordPress'te hata ayıklama hakkında daha fazla bilgi edinin.
    olmadı hocam
  • 20-12-2020, 16:19:14
    #9
    Üyeliği durduruldu
    Hocam doğru yazdığınızdan eminmisiniz?
    Size ihtimalli bir kod vermedim, garanti çalışması gerekli.

    Anydesk gönderin özelden, hızlıca çözelim hocam.