Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetSimple 3.0Beta in need of Testers
#14
Chris, I was looking into the warnings that Oleg reported, and tracing the issue, I could not understand what this piece of code is doing:
Code:
$bt = debug_backtrace();
  $caller = array_shift($bt);
  
  $pathName= pathinfo_filename($caller['file']);

  if ($live_plugins[$pathName.'.php']=='true'){
    $plugins[] = array(
        'hook' => $hook_name,
        'function' => $added_function,
        'args' => (array) $args,
        'file' => $pathName.'.php',
    'line' => $caller['line']
    );
  }

SCRATCH THIS... This only supresses the warning, but does not fixes the issue, exposed below in my edit.
Quote:I think in order to fix the issue you just need ensure the file trying to validate exists, to avoid those warnings.

I changed line 152 to be:
Code:
if (isset ($live_plugins[$pathName.'.php']) && $live_plugins[$pathName.'.php']=='true')

This suppresses the warnings.

EDIT:
Diving even more into the code, I think I understand the problem.
The problem is that, if I use add_action() inside of a different file other than the main plugin file, when trying to get the caller, is not returning the true plugin, instead is trying to use the auxiliary file. Not sure how to really fix this within the new get simple, but I do think, that us (developers) should be allowed to use hooks in auxiliary files.
- Julian

My GetSimple Plugins: Simple Image Gallery | TweetMeme reTweet Button
Reply


Messages In This Thread
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 02:42:29
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 05:33:31
GetSimple 3.0Beta in need of Testers - by Oleg06 - 2011-02-11, 05:38:12
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 05:43:42
GetSimple 3.0Beta in need of Testers - by Oleg06 - 2011-02-11, 05:46:13
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 05:49:17
GetSimple 3.0Beta in need of Testers - by Oleg06 - 2011-02-11, 05:49:50
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 06:03:47
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 06:10:44
GetSimple 3.0Beta in need of Testers - by marrco - 2011-02-11, 07:41:38
GetSimple 3.0Beta in need of Testers - by juliancc - 2011-02-11, 12:58:23
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-11, 23:11:30
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-12, 05:26:59
GetSimple 3.0Beta in need of Testers - by RobA - 2011-02-13, 12:15:23
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-13, 12:30:35
GetSimple 3.0Beta in need of Testers - by RobA - 2011-02-13, 12:49:18
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-13, 12:53:38
GetSimple 3.0Beta in need of Testers - by RobA - 2011-02-13, 13:34:17
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-13, 13:40:28
GetSimple 3.0Beta in need of Testers - by RobA - 2011-02-13, 13:56:49
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-13, 22:07:11
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-13, 23:25:47
GetSimple 3.0Beta in need of Testers - by RobA - 2011-02-14, 08:48:07
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-20, 23:18:21
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-21, 01:48:19
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-02-23, 23:21:02
GetSimple 3.0Beta in need of Testers - by yojoe - 2011-03-01, 23:42:34
GetSimple 3.0Beta in need of Testers - by colaK - 2011-03-02, 00:19:17
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-03-02, 00:40:00
GetSimple 3.0Beta in need of Testers - by yojoe - 2011-03-03, 02:25:11
GetSimple 3.0Beta in need of Testers - by yojoe - 2011-03-08, 03:00:44
GetSimple 3.0Beta in need of Testers - by mikeh - 2011-03-08, 04:26:32
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-03-11, 06:38:40
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-03-11, 23:22:41
GetSimple 3.0Beta in need of Testers - by mikeh - 2011-03-12, 03:43:18
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-03-12, 03:44:41
GetSimple 3.0Beta in need of Testers - by mikeh - 2011-03-12, 03:56:22
GetSimple 3.0Beta in need of Testers - by yojoe - 2011-03-12, 07:20:55
GetSimple 3.0Beta in need of Testers - by ccagle8 - 2011-03-12, 07:50:24



Users browsing this thread: 1 Guest(s)