@@ -329,7 +329,11 @@ public function getLanguage($moduleDirname, $prefix = '', $suffix = '', $addFq =
329329 */
330330 public function getLeftString ($ string )
331331 {
332- return \mb_substr ($ string , 0 , (int )\mb_strpos ($ string , '_ ' ));
332+ $ ret = '' ;
333+ if ('' != $ string ) {
334+ $ ret .= \mb_substr ($ string , 0 , (int )\mb_strpos ($ string , '_ ' ));
335+ }
336+ return $ ret ;
333337 }
334338
335339 /**
@@ -340,12 +344,14 @@ public function getLeftString($string)
340344 */
341345 public function getRightString ($ string = null )
342346 {
343- if (\mb_strpos ($ string , '_ ' )) {
344- $ str = \mb_strpos ($ string , '_ ' );
345- if (false !== $ str ) {
346- $ ret = \mb_substr ($ string , $ str + 1 , \mb_strlen ($ string ));
347+ if ('' != $ string ) {
348+ if (\mb_strpos ($ string , '_ ' )) {
349+ $ str = \mb_strpos ($ string , '_ ' );
350+ if (false !== $ str ) {
351+ $ ret = \mb_substr ($ string , $ str + 1 , \mb_strlen ($ string ));
347352
348- return $ ret ;
353+ return $ ret ;
354+ }
349355 }
350356 }
351357
@@ -382,7 +388,11 @@ public function getCamelCase($string, $ucfirst = false, $lcfirst = false)
382388 */
383389 public function getUcfirst ($ string )
384390 {
385- return \ucfirst ($ string );
391+ $ ret = '' ;
392+ if ('' != $ string ) {
393+ $ ret .= \ucfirst ($ string );
394+ }
395+ return $ ret ;
386396 }
387397
388398 /**
@@ -393,7 +403,11 @@ public function getUcfirst($string)
393403 */
394404 public function getLcfirst ($ string )
395405 {
396- return \lcfirst ($ string );
406+ $ ret = '' ;
407+ if ('' != $ string ) {
408+ $ ret .= \lcfirst ($ string );
409+ }
410+ return $ ret ;
397411 }
398412
399413 /**
@@ -404,7 +418,11 @@ public function getLcfirst($string)
404418 */
405419 public function getStrToUpper ($ string )
406420 {
407- return \mb_strtoupper ($ string );
421+ $ ret = '' ;
422+ if ('' != $ string ) {
423+ $ ret .= \mb_strtoupper ($ string );
424+ }
425+ return $ ret ;
408426 }
409427
410428 /**
@@ -415,7 +433,11 @@ public function getStrToUpper($string)
415433 */
416434 public function getStrToLower ($ string )
417435 {
418- return \mb_strtolower ($ string );
436+ $ ret = '' ;
437+ if ('' != $ string ) {
438+ $ ret .= \mb_strtolower ($ string );
439+ }
440+ return $ ret ;
419441 }
420442
421443 /**
0 commit comments