From 5d3a7ffbf1e0e5f6bb715c741c710b7c2ff733a1 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 18 Jan 2018 17:41:01 +1100 Subject: [PATCH] add debugging --- booking.helper.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booking.helper.inc b/booking.helper.inc index 3530a22..aacf1cf 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -55,7 +55,10 @@ function _booking_ucname($string) { if ($prefixes) { // capitalize letter after certain name prefixes e.g 'Mc' //$string = preg_replace("/\\b($prefixes)(\\w)/e", '"$1".strtoupper("$2")', $string); - $string = preg_replace_callback('/\\b($prefixes)(\\w)/', function ($m) { return $m[1] . strtoupper($m[2]); }, $string); + $string = preg_replace_callback('/\\b($prefixes)(\\w)/', function ($m) { + watchdog('booking_debug', "
Prefixes match: \n@info
", array('@info' => print_r( $m, true))); + return $m[1] . strtoupper($m[2]); + }, $string); } if ($suffixes) { // decapitalize certain word suffixes e.g. 's