Categories > TinyButStrong general >

noerr, on subtemplates scripts

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Vad Skakov
Date: 2005-08-28
Time: 16:52

noerr, on subtemplates scripts

HTML:
[onload;script=[var.script_file];subtpl]

Result if [var.script_file] - not found:
Warning: meth_locator_replace(w:/home/garant/www/defs/noscript.php): failed to open stream: No such file or directory in w:\home\garant\www\defs\tbs_class.php on line 985

TBS ver. 2.05b5

noerr - doesn't work :(
By: Skrol29
Date: 2005-08-29
Time: 18:42

Re: noerr, on subtemplates scripts

Hello vad,

You're rigth this kind of error cannot be cancelled by noerr.
This is the same for previous versions.
I'll see if I can arrage that.
By: Vad Skakov
Date: 2005-08-29
Time: 22:36

Re: noerr, on subtemplates scripts

I think that's real easy:
978:  if ($Script) {// Include external PHP script
979:    $File = str_replace($this->ChrVal,$CurrVal,$Loc->PrmLst['script']);
980:    $this->meth_Merge_PhpVar($File,false);
981:    $Switch = isset($Loc->PrmLst['subtpl']);
982:    $GetOb = ($Switch or isset($Loc->PrmLst['getob']));
983:    $CurrPrm =& $Loc->PrmLst; // Local var for users
984:    $this->meth_Misc_ChangeMode(true,$Loc,$CurrVal,$Switch,$GetOb);
---:    if (is_readable($File) {
985:      if (isset($Loc->PrmLst['once'])) {include_once($File);} else {include($File);}
986:      $this->meth_Misc_ChangeMode(false,$Loc,$CurrVal,$Switch,$GetOb);
---:    }
987:  }
By: Skrol29
Date: 2005-08-30
Time: 10:24

Re: noerr, on subtemplates scripts

Yes, but is this really a need to avoid an error message when a sub-script is not found ?
By: Skrol29
Date: 2005-08-30
Time: 15:20

Re: noerr, on subtemplates scripts

I've arranged that in version 2.05 beta 06 anyway.

Thanks for your remark.
By: Vad Skakov
Date: 2005-08-31
Time: 02:30

Re: noerr, on subtemplates scripts

error messages will be good for debugging purposes.
By: Vad Skakov
Date: 2005-08-31
Time: 02:31

Re: noerr, on subtemplates scripts

thanx